This document discusses different approaches to building an authentication middleware in Go web applications. It begins with using the standard library, then explores Goji and its request context. It settles on using the x/net/context package and kami router, which allow sharing database connections and authentication objects across requests and tests through the request context. Middleware is defined hierarchically in kami. This approach avoids global variables and simplifies testing.
Introducing the Eve REST API Framework.
FOSDEM 2014, Brussels
PyCon Sweden 2014, Stockholm
PyCon Italy 2014, Florence
Python Meetup, Helsinki
EuroPython 2014, Berlin
"The little big project. From zero to hero in two weeks with 3 front-end engi...Fwdays
It is believed that the front end is only one part of the job. We need a backend to store data, we need some DevOps. Oh, I also forgot about QA. There are legends about titans from the past who could single-handedly draw a design and launch a website.
But here's the real story: we has the Great Idea, it won't work without a back-end, there are only front-end developers in the team, outsourcing is possible only in design, the deadline is too near. Just smile and wave... Or we will can realised the project uses front-end technologies only, cut comlicated things, dive into devops. Spoiler: we did it, the Bobuk-Bacek formula works, JavaScript is power.
You will find out how I Love Front-end was launched, what was cut off by Occam's razor and why everyone hates the Mona Lisa.
Audience and level.
Full-stack developers and front-end developers who want to learn how to make back-end for front-end. Just curious guys. Level from junior to middle.
The document provides an overview of Node.js and why it is useful for building scalable network programs. It discusses how Node.js uses asynchronous and non-blocking I/O to handle thousands of concurrent connections using a single thread. This allows Node.js applications to scale horizontally by adding more machines. It also covers how the asynchronous programming model requires a different "mind shift" compared to traditional synchronous approaches.
This document provides an overview and introduction to code reading skills and the RestClient library. It discusses why code reading is an important skill, introduces RestClient as a library for making HTTP requests, and provides examples of using RestClient to interact with Twitter's API. It also summarizes some other Ruby libraries and concepts discussed in the document like CSV, threading, and signal handling.
This document provides an overview of CouchDB, a document-oriented database. It describes CouchDB's key features such as storing data as JSON documents with dynamic schemas, providing a RESTful HTTP API, using JavaScript for views and aggregations, and replicating data between databases. It also provides code examples for common operations like creating, retrieving, updating and deleting documents, as well as attaching files. The document recommends libraries for using CouchDB from different programming languages and shares the code for a simple CouchDB library created in an afternoon.
From ReactPHP to Facebook Hack's Async implementation and many more, asynchronous programming has been a 'hot' topic lately. But how well does async programming support work in PHP and what can you actually use it for in your projects ? Let's look at some real-world use cases and how they leverage the power of async to do things you didn't know PHP could do.
This document discusses embracing HTTP and changing approaches to web application development. It suggests flipping dependencies so that applications are built around HTTP rather than frameworks. It also recommends taking a more stateful approach by going CQRS/ES rather than relying on CRUD and resources. The document questions common patterns and promotes thinking beyond frameworks to more fundamental concepts.
The document provides an overview of a NodeJS CRUD and deployment course. The course outline includes: setting up a NodeJS environment on SmartOS with MySQL and Git in 3 minutes; tools for cloud development like SSH, SCP, and Git; building a simple web server with authorization using Passport and CRUD functionality with MySQL; and advanced topics like load balancing for cloud services. The course also provides a Micloud server for hands-on labs and sample projects.
This document discusses using CouchDB on Android applications. It provides instructions on adding CouchDB functionality to an Android project using Couchbase Mobile for Android. It also describes how to access a CouchDB instance from an Android device using Futon and the Couchbase Service. The document contains code examples for creating, reading, updating and deleting CouchDB documents from an Android app.
The document discusses building REST APIs in Flask. It introduces REST concepts and how Flask supports REST. Validation of resources can be done with Trafaret. The document demonstrates creating API resources with Flask extensions that support validation, authentication decorators, and modeling SQL Alchemy classes. Future work includes adding filtering, caching, throttling and customizing fields for modeled resources.
The document discusses using Python for ethical hacking and penetration testing. It provides reasons for using Python such as its ease of use, readable syntax, rich libraries, and existing tools. It then covers various Python libraries and frameworks used for tasks like reconnaissance, scanning, exploitation, and packet manipulation. Specific topics covered include file I/O, requests, sockets, scapy, and more.
Caching and tuning fun for high scalabilityWim Godden
Caching has been a 'hot' topic for a few years. But caching takes more than merely taking data and putting it in a cache : the right caching techniques can improve performance and reduce load significantly. But we'll also look at some major pitfalls, showing that caching the wrong way can bring down your site. If you're looking for a clear explanation about various caching techniques and tools like Memcached, Nginx and Varnish, as well as ways to deploy them in an efficient way, this talk is for you.
“Use the right tool for the right job” is one of the first thing they teach you when you start out in these waters. I would make “Get to really know your tools” a second.
In this talk we’re going to work on the architecture of an app that showcases some common features/scenarios we all probably already have in the apps we’re working on: counters, leaderboards, queuing, timelines, caching. But this time we’ll implement them with Redis, making the apps much faster, your hardware (and you) much cooler, your boss (and the clients) much happier and hopefully your salary a bit higher.
This document discusses using Flask and Eve to build a REST API with Python in 3 days. It introduces Flask as a microframework for building web applications with Python. Eve is presented as a Python framework built on Flask that allows building RESTful APIs with MongoDB in a simple way. The document provides examples of creating basic Flask and Eve apps, configuring Eve settings like schemas and authentication, and describes many features of Eve like filtering, sorting, pagination and validation.
This document discusses socket programming in PHP. It begins with an overview of inter-process communication and network sockets. It then covers PHP streams and how they provide a generic interface for input and output. The document dives into details of socket programming in PHP using different extensions, covering topics like creating, binding, listening for, accepting, reading and writing sockets. It also discusses blocking, selecting sockets and websockets.
This document provides an introduction to using MongoDB with C# developers. It discusses how to connect to a MongoDB database from a C# application, perform basic CRUD operations on documents using the C# driver, and more advanced features like aggregation, geospatial queries, and gridFS for large files. The document includes code examples for connecting to a database, inserting, finding, updating, and deleting documents, as well as using LINQ queries and the aggregation framework. Resources for learning more about the MongoDB C# driver are also provided.
The document discusses MongoDB, a document-oriented NoSQL database. It provides an overview of MongoDB, explaining that it uses documents (rather than tables and rows), has dynamic schemas, and allows for easy horizontal scaling. It also covers some basic MongoDB concepts and operations like collections, embedded documents, and CRUD functions like insert, find, update, and remove.
The OWASP Proxy is an intercepting proxy library that allows visibility and modification of HTTP communications in a flexible, performant way. It provides a message object model that allows buffering or streaming of requests and responses. The proxy can be used to implement useful functions like response inspection, reverse proxying, and integration with technologies like SSL, SOCKS, and Apache JServ Protocol. It aims to be a clean, multi-protocol foundation for building custom proxies.
This document discusses common web application attacks and how to prevent them. It begins with an overview of SQL injection, the most prevalent attack, and how hackers can exploit unfiltered user input to access sensitive data or delete database records. The document then covers other injection attacks, session hijacking, cross-site scripting (XSS), cross-site request forgery (CSRF), clickjacking, and general best practices for securing code, servers, and authentication. Prevention methods include input validation, output escaping, prepared statements, CSRF tokens, and limiting access.
The document provides an overview of using MongoDB with C# developers. It discusses key MongoDB concepts like document databases and BSON, and how to connect and perform CRUD operations with the C# driver. It also covers more advanced topics like geospatial queries, MapReduce, and GridFS for large files. Resources are provided for further learning about MongoDB and the C# driver.
Node.js is an asynchronous JavaScript runtime that allows for efficient handling of I/O operations. The presentation discusses developing with Node.js by using modules from NPM, debugging with node-inspector, common pitfalls like blocking loops, and best practices like avoiding large heaps and offloading intensive tasks. Key Node.js modules demonstrated include Express for web frameworks and Socket.io for real-time applications.
The document discusses Node.js and compares it to other technologies like CakePHP. It provides an overview of Node.js including its event-driven and asynchronous model, key features like the V8 engine and packages/modules, and frameworks like Express. It then demonstrates building a sample messaging application with a JSON API using both CakePHP and Node.js.
As presented at Confoo 2013.
More than some arcane NoSQL tool, Redis is a simple but powerful swiss army knife you can begin using today.
This talk introduces the audience to Redis and focuses on using it to cleanly solve common problems. Along the way, we'll see how Redis can be used as an alternative to several common PHP tools.
Beyond php it's not (just) about the codeWim Godden
The document discusses database queries and optimization. It begins with an example of a complex database query and explains how to detect problematic queries using tools like slow query log and pt-query-digest. It then discusses indexing strategies and when to use indexes. The document also describes a case study of a client's jobs search site that was experiencing high database load due to inefficient queries in a loop, and how batching the queries into a single query solved the problem.
Inside MongoDB: the Internals of an Open-Source DatabaseMike Dirolf
The document discusses MongoDB, including how it stores and indexes data, handles queries and replication, and supports sharding and geospatial indexing. Key points covered include how MongoDB stores data in BSON format across data files that grow in size, uses memory-mapped files for data access, supports indexing with B-trees, and replicates operations through an oplog.
The document provides information about using Ruby gems. It discusses installing rubygems with "sudo apt-get install rubygems", then installing specific gems like git with "gem install git". It provides an example of using the git gem to log commits between two versions. It also briefly mentions HAML, SASS, HPricot, RSpec, Cucumber, and OmniAuth gems.
Operations: Production Readiness Review – How to stop bad things from HappeningAmazon Web Services
The document provides an overview of key areas to review for production readiness including architecture design, monitoring, logging, documentation, alerting, service level agreements, expected throughput, testing, and deployment strategy. It summarizes best practices and considerations for each area such as using circuit breakers in monitoring, consistent logging formats, storing documentation near code, automating level 1 operations, and strategies for testing, deployments, and managing error budgets.
This document discusses using CouchDB on Android applications. It provides instructions on adding CouchDB functionality to an Android project using Couchbase Mobile for Android. It also describes how to access a CouchDB instance from an Android device using Futon and the Couchbase Service. The document contains code examples for creating, reading, updating and deleting CouchDB documents from an Android app.
The document discusses building REST APIs in Flask. It introduces REST concepts and how Flask supports REST. Validation of resources can be done with Trafaret. The document demonstrates creating API resources with Flask extensions that support validation, authentication decorators, and modeling SQL Alchemy classes. Future work includes adding filtering, caching, throttling and customizing fields for modeled resources.
The document discusses using Python for ethical hacking and penetration testing. It provides reasons for using Python such as its ease of use, readable syntax, rich libraries, and existing tools. It then covers various Python libraries and frameworks used for tasks like reconnaissance, scanning, exploitation, and packet manipulation. Specific topics covered include file I/O, requests, sockets, scapy, and more.
Caching and tuning fun for high scalabilityWim Godden
Caching has been a 'hot' topic for a few years. But caching takes more than merely taking data and putting it in a cache : the right caching techniques can improve performance and reduce load significantly. But we'll also look at some major pitfalls, showing that caching the wrong way can bring down your site. If you're looking for a clear explanation about various caching techniques and tools like Memcached, Nginx and Varnish, as well as ways to deploy them in an efficient way, this talk is for you.
“Use the right tool for the right job” is one of the first thing they teach you when you start out in these waters. I would make “Get to really know your tools” a second.
In this talk we’re going to work on the architecture of an app that showcases some common features/scenarios we all probably already have in the apps we’re working on: counters, leaderboards, queuing, timelines, caching. But this time we’ll implement them with Redis, making the apps much faster, your hardware (and you) much cooler, your boss (and the clients) much happier and hopefully your salary a bit higher.
This document discusses using Flask and Eve to build a REST API with Python in 3 days. It introduces Flask as a microframework for building web applications with Python. Eve is presented as a Python framework built on Flask that allows building RESTful APIs with MongoDB in a simple way. The document provides examples of creating basic Flask and Eve apps, configuring Eve settings like schemas and authentication, and describes many features of Eve like filtering, sorting, pagination and validation.
This document discusses socket programming in PHP. It begins with an overview of inter-process communication and network sockets. It then covers PHP streams and how they provide a generic interface for input and output. The document dives into details of socket programming in PHP using different extensions, covering topics like creating, binding, listening for, accepting, reading and writing sockets. It also discusses blocking, selecting sockets and websockets.
This document provides an introduction to using MongoDB with C# developers. It discusses how to connect to a MongoDB database from a C# application, perform basic CRUD operations on documents using the C# driver, and more advanced features like aggregation, geospatial queries, and gridFS for large files. The document includes code examples for connecting to a database, inserting, finding, updating, and deleting documents, as well as using LINQ queries and the aggregation framework. Resources for learning more about the MongoDB C# driver are also provided.
The document discusses MongoDB, a document-oriented NoSQL database. It provides an overview of MongoDB, explaining that it uses documents (rather than tables and rows), has dynamic schemas, and allows for easy horizontal scaling. It also covers some basic MongoDB concepts and operations like collections, embedded documents, and CRUD functions like insert, find, update, and remove.
The OWASP Proxy is an intercepting proxy library that allows visibility and modification of HTTP communications in a flexible, performant way. It provides a message object model that allows buffering or streaming of requests and responses. The proxy can be used to implement useful functions like response inspection, reverse proxying, and integration with technologies like SSL, SOCKS, and Apache JServ Protocol. It aims to be a clean, multi-protocol foundation for building custom proxies.
This document discusses common web application attacks and how to prevent them. It begins with an overview of SQL injection, the most prevalent attack, and how hackers can exploit unfiltered user input to access sensitive data or delete database records. The document then covers other injection attacks, session hijacking, cross-site scripting (XSS), cross-site request forgery (CSRF), clickjacking, and general best practices for securing code, servers, and authentication. Prevention methods include input validation, output escaping, prepared statements, CSRF tokens, and limiting access.
The document provides an overview of using MongoDB with C# developers. It discusses key MongoDB concepts like document databases and BSON, and how to connect and perform CRUD operations with the C# driver. It also covers more advanced topics like geospatial queries, MapReduce, and GridFS for large files. Resources are provided for further learning about MongoDB and the C# driver.
Node.js is an asynchronous JavaScript runtime that allows for efficient handling of I/O operations. The presentation discusses developing with Node.js by using modules from NPM, debugging with node-inspector, common pitfalls like blocking loops, and best practices like avoiding large heaps and offloading intensive tasks. Key Node.js modules demonstrated include Express for web frameworks and Socket.io for real-time applications.
The document discusses Node.js and compares it to other technologies like CakePHP. It provides an overview of Node.js including its event-driven and asynchronous model, key features like the V8 engine and packages/modules, and frameworks like Express. It then demonstrates building a sample messaging application with a JSON API using both CakePHP and Node.js.
As presented at Confoo 2013.
More than some arcane NoSQL tool, Redis is a simple but powerful swiss army knife you can begin using today.
This talk introduces the audience to Redis and focuses on using it to cleanly solve common problems. Along the way, we'll see how Redis can be used as an alternative to several common PHP tools.
Beyond php it's not (just) about the codeWim Godden
The document discusses database queries and optimization. It begins with an example of a complex database query and explains how to detect problematic queries using tools like slow query log and pt-query-digest. It then discusses indexing strategies and when to use indexes. The document also describes a case study of a client's jobs search site that was experiencing high database load due to inefficient queries in a loop, and how batching the queries into a single query solved the problem.
Inside MongoDB: the Internals of an Open-Source DatabaseMike Dirolf
The document discusses MongoDB, including how it stores and indexes data, handles queries and replication, and supports sharding and geospatial indexing. Key points covered include how MongoDB stores data in BSON format across data files that grow in size, uses memory-mapped files for data access, supports indexing with B-trees, and replicates operations through an oplog.
The document provides information about using Ruby gems. It discusses installing rubygems with "sudo apt-get install rubygems", then installing specific gems like git with "gem install git". It provides an example of using the git gem to log commits between two versions. It also briefly mentions HAML, SASS, HPricot, RSpec, Cucumber, and OmniAuth gems.
Operations: Production Readiness Review – How to stop bad things from HappeningAmazon Web Services
The document provides an overview of key areas to review for production readiness including architecture design, monitoring, logging, documentation, alerting, service level agreements, expected throughput, testing, and deployment strategy. It summarizes best practices and considerations for each area such as using circuit breakers in monitoring, consistent logging formats, storing documentation near code, automating level 1 operations, and strategies for testing, deployments, and managing error budgets.
Apache Spark Streaming + Kafka 0.10 with Joan ViladrosarieraSpark Summit
Spark Streaming has supported Kafka since it’s inception, but a lot has changed since those times, both in Spark and Kafka sides, to make this integration more fault-tolerant and reliable.Apache Kafka 0.10 (actually since 0.9) introduced the new Consumer API, built on top of a new group coordination protocol provided by Kafka itself. So a new Spark Streaming integration comes to the playground, with a similar design to the 0.8 Direct DStream approach. However, there are notable differences in usage, and many exciting new features. In this talk, we will cover what are the main differences between this new integration and the previous one (for Kafka 0.8), and why Direct DStreams have replaced Receivers for good. We will also see how to achieve different semantics (at least one, at most one, exactly once) with code examples. Finally, we will briefly introduce the usage of this integration in Billy Mobile to ingest and process the continuous stream of events from our AdNetwork.
by Joyjeet Banerjee, Enterprise Solutions Architect, AWS
Amazon Aurora is a MySQL- and PostgreSQL-compatible database engine that combines the speed and availability of high-end commercial databases with the simplicity and cost-effectiveness of open source databases. In this deep dive session, we’ll discuss best practices and explore new features in areas like high availability, security, performance management and database cloning. Level 300
Streaming Data Analytics with Amazon Redshift and Kinesis FirehoseAmazon Web Services
by Joyjeet Banerjee, Enterprise Solutions Architect, AWS
Evolving your analytics from batch processing to real-time processing can have a major business impact, but ingesting streaming data into your data warehouse requires building complex streaming data pipelines. Amazon Kinesis Firehose solves this problem by making it easy to transform and load streaming data into Amazon Redshift so that you can use existing analytics and business intelligence tools to extract information in near real-time and respond promptly. In this session, we will dive deep using Amazon Kinesis Firehose to load streaming data into Amazon Redshift reliably, scalably, and cost-effectively. Level: 200
An introduction and future of Ruby coverage librarymametter
Ruby's current test coverage feature, coverage.so, only measures line coverage. The speaker proposes expanding it to support function and branch coverage in Ruby 2.5. This would involve updating the coverage.so API to return additional coverage data types and structure the output data in a more extensible way. A preliminary demo applying the new coverage.so to Ruby code showed it can integrate with C code coverage from GCOV and display results in LCOV format. The speaker seeks feedback on the proposed API design to finalize it for Ruby 2.5.
The presentation at DevFest Tokyo 2017 / @__timakin__
An introduction of blockchain and why go is nice to implement blockchain.
Additionally described about the blockchain projects that are based on Go.
1) Mercari has transitioned some services to microservices architecture running on Kubernetes in the US region to improve development velocity.
2) Key challenges in operating microservices include deployment automation using Spinnaker, and observability of distributed systems through request tracing, logging, and metrics.
3) The architecture is still evolving with discussions on service mesh and chaos engineering to improve reliability in the face of failures. Microservices adoption is just beginning in the JP region.
The document discusses using gRPC and Protocol Buffers to build fast and reliable APIs, describing how gRPC uses Protocol Buffers to define service interfaces and handle serialization, and allows building clients and servers in various languages that can communicate over the network through language-independent services. It provides examples of using gRPC to define and call both unary and streaming RPC services from Swift clients and servers.
This document contains the transcript from a presentation titled "So You Wanna Go Fast?" by Tyler Treat. Some of the key topics discussed include measuring performance using tools like pprof, how different language features in Go like channels, interfaces, and memory management can impact performance, and techniques for writing concurrent and multi-core friendly code in Go like using read-write mutexes. The overall message is that performance depends greatly on the specific situation and trade-offs must be considered between concurrency, memory usage, and execution speed. Measuring first is emphasized to guide any optimizations.
Andrew Betts Web Developer, The Financial Times at Fastly Altitude 2016
Running custom code at the Edge using a standard language is one of the biggest advantages of working with Fastly’s CDN. Andrew gives you a tour of all the problems the Financial Times and Nikkei solve in VCL and how their solutions work.
The document discusses building apps for the Google Assistant using Google Cloud Functions and Actions on Google. It provides an overview of the architecture, development workflow, and ways for users to discover apps. Key points include using Cloud Functions as a serverless environment to handle requests, the Actions Console for configuration, and in-dialogue discovery or the Assistant Directory as ways for users to find actions.
Original slides from Ryan Dahl's NodeJs intro talkAarti Parikh
These are the original slides from the nodejs talk. I was surprised not find them on slideshare so adding them. The video link is here https://www.youtube.com/watch?v=ztspvPYybIY
This document provides an introduction and overview of a Node.js tutorial presented by Tom Hughes-Croucher. The tutorial covers topics such as building scalable server-side code with JavaScript using Node.js, debugging Node.js applications, using frameworks like Express.js, and best practices for deploying Node.js applications in production environments. The tutorial includes exercises for hands-on learning and demonstrates tools and techniques like Socket.io, clustering, error handling and using Redis with Node.js applications.
The document is a presentation about Node.js, a JavaScript runtime built on Chrome's V8 JavaScript engine. It discusses how Node.js uses an event-driven, non-blocking I/O model that makes it particularly suited for real-time web applications and I/O-intensive applications compared to traditional threaded server models. It provides examples of Node.js features like asynchronous I/O, event loops, modules and the npm package manager.
MongoDB is the trusted document store we turn to when we have tough data store problems to solve. For this talk we are going to go a little bit off the path and explore what other roles we can fit MongoDB into. Others have discussed how to turn MongoDB’s capped collections into a publish/subscribe server. We stretch that a little further and turn MongoDB into a full fledged broker with both publish/subscribe and queue semantics, and a the ability to mix them. We will provide code and a running demo of the queue producers and consumers. Next we will turn to coordination services: We will explore the fundamental features and show how to implement them using MongoDB as the storage engine. Again we will show the code and demo the coordination of multiple applications.
Serverless computing is becoming increasingly popular in cloud native development. It provides advantages to an organization in terms of cost, scalability, and agility. Ballerina was created to make integrations simple. It also adds agility to the development process. What will happen when Ballerina meets serverless? A couple of serverless platforms have already started supporting Ballerina as a runtime.
This presentation will discuss the advantages of adopting a serverless strategy, the work done in running Ballerina in OpenWhisk and Kubeless, and other efforts going on to support Ballerina in the serverless world.
This document provides an overview of Catalyst, an elegant Perl MVC framework. It discusses how to install and set up a Catalyst application, including generating the initial application structure. It then explains the MVC pattern and describes the various components - the Model, View and Controller. The document dives into details about dispatching requests to controller actions in Catalyst and describes the context object ($c) that is passed to actions and provides access to request/response objects, configuration, logging and more.
Using and scaling Rack and Rack-based middlewareAlona Mekhovova
Rack provides a standard interface between web servers and web applications. It allows a web application to return a status, headers, and a body in response to an HTTP request. Middleware can be plugged into a Rack application to modify requests and responses. Popular Rack middleware includes Rack::Cache, Rack::Middleware, and Warden for authentication. In Rails, middleware is configured through an initializer and plugged into the middleware stack to run before or after other middleware.
A language for the Internet: Why JavaScript and Node.js is right for Internet...Tom Croucher
Increasingly we want to do more with the web and Internet applications we build. We have more features, more data, more users, more devices and all of it needs to be in real-time. With all of these demands how can we keep up? The answer is choosing a language and a platform that are optimized for the kind of architecture Internet and web applications really have. The traditional approach prioritises computation, assigning server resources before they are actually needed. JavaScript and Node.js both take an event driven approach only assigning resources to events as they happen. This allows us to make dramatic gains in performance and resource utilization while still having an environment which is fun and easy to program.
The document provides an overview of Node.js, a JavaScript runtime environment for building scalable network applications. Some key points covered include:
- Node.js is built on Google's V8 JavaScript engine and is event-driven and non-blocking.
- It is well-suited for data-intensive real-time applications due to its lightweight and efficient nature.
- Node.js differs from other scripting languages by being non-blocking, single-threaded, and having an event-based approach built-in.
This document provides an overview of the Play! web framework for Java, including how it differs from traditional Java web development approaches by avoiding servlets, portlets, XML, EJBs, JSPs, and other technologies. It demonstrates creating a simple PDF generation application using Play!, including defining a model, controller, and view. The framework uses conventions over configuration and allows rapid development through features like automatic reloading of code changes and helpful error pages.
Net/http and the http.handler interfaceJoakim Gustin
1. The document discusses building web servers in Go using the net/http package and the http.Handler interface. It covers the basics of routing, middleware, accessing dependencies, and testing HTTP handlers.
2. Various techniques for routing requests, using middleware, injecting dependencies, and testing HTTP handlers are demonstrated. Key concepts like the http.Handler interface and middleware signatures are explained.
3. Tips and tricks for Go HTTP development are provided, such as using anonymous structs, returning errors from handlers, and setting HTTP status codes on errors.
1. The document discusses building web servers in Go using the net/http package and the http.Handler interface. It covers the basics of routing, middleware, accessing dependencies, and testing HTTP handlers.
2. Various tips and tricks are provided, such as using anonymous structs, injecting dependencies rather than global variables, and returning errors from HTTP handlers to allow for centralized error handling.
3. The presentation emphasizes best practices like implementing the http.Handler interface on functions, using middleware to modify request handling, and returning custom error types from handlers to set HTTP status codes.
A language for the Internet: Why JavaScript and Node.js is right for Internet...Tom Croucher
Node.js and JavaScript are well-suited for Internet applications because Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, capable of supporting many more concurrent connections than traditional server-side models like Apache. This event loop system allows Node.js to handle multiple requests simultaneously without blocking any specific request. It also minimizes memory usage so more requests can be served from fewer servers.
Czy wiesz co potrafi zrobić twój serwer reverse-proxy? Wydaje Ci się, że żeby zrobić sprytny routing / uwierzytelnianie / autoryzację (niepotrzebne skreślić) między serwisami musisz go napisać w Javie lub jako moduł w C? A co jeżeli odpalanie JVM tylko po to, żeby do każdego żądania http dokleić jeden nagłówek to armata na wróbla? Zwłaszcza, że prawie na pewno gdzieś tam po drodze mijasz nginx... Zapraszam Cię do świata idealnej symbiozy nginx i Lua.
As PHP programmers we are used to waiting for network I/O, in general we may not even consider any other option. But why wait? Why not jump on board the Async bullet-train and experience life in the fast lane and give Go and NodeJS a run for the money. This talk will aim to make the audience aware of the benefits, opportunities, and pitfalls of asynchronous programming in PHP, and guide them through the native functionality, frameworks and PHP extensions though which it can be facilitated.
The document describes deepM, a generic design framework for building single-page applications and RESTful APIs/services. It provides tools for landscape-oriented programming including objects composition, queries, transformations, and aspect-oriented programming. Key features include isomorphism to write code that runs everywhere, homogeneous RESTful collections with a common query language and CRUD API, and an object capability model to control object behavior based on context. The framework aims to enable building service-oriented applications in a modular, reusable way.
The document provides tips for optimizing PHP code, including using string functions instead of regular expressions where possible, passing references to reduce memory usage, using persistent database connections, and checking mysql_unbuffered_query() for faster queries. It also discusses HTTP requests and responses, cookie expiry, references in PHP, returning references from functions, and the debug_backtrace() function. The document concludes with tips for improving security such as checking for uninitialized variables, validating user input, and restricting access to included files.
Thrift and PasteScript are frameworks for building distributed applications and services. Thrift allows defining data types and interfaces using a simple definition language that can generate code in multiple languages. It uses a compact binary protocol for efficient RPC-style communication between clients and servers. PasteScript builds on WSGI and provides tools like paster for deploying and managing Python web applications, along with reloading and logging capabilities. It integrates with Thrift via server runners and application factories.
"As an asynchronous event driven JavaScript runtime, Node is designed to build scalable network applications" così si presenta Node.js, piattaforma tecnologica che - grazie alla sua immediatezza e produttività - ha conquistato dapprima startup e piccole aziende, fino a ritagliarsi uno spazio importante in realtà come IBM, LinkedIn, Netflix e Yahoo. La stessa Microsoft ha riconosciuto le potenzialità della piattaforma, tanto da integrare Node.js in Visual Studio Code e nelle ultime release di Visual Studio, oltre a basarci alcuni dei propri servizi di Azure come "Mobile Services" e "Functions".
In questa sessione vedremo come implementare con Node.js alcuni scenari applicativi comuni nell’ambito dello sviluppo web, analizzando quando la sua adozione può portarci vantaggi nel nostro lavoro quotidiano. In conclusione, faremo una breve panoramica architetturale, descrivendo alcuni scenari di cooperazione tra .NET e Node.js nello stesso sistema.
Codice e demo: https://github.com/rucka/CommunityDays2016
Async/await is a new language feature that will ship with Swift 5.5 this year. There’s no doubt it will have a significant impact on how we write asynchronous code.
In this talk, we’re going to look at some use cases for async/await, how we can call existing Swift APIs using this new feature, and why your decision to write your SDK in Objective-C might turn out to have been a very clever move.
We’ll also have a look at the refactoring support Apple is adding to Xcode and how it will help you migrate your existing code base.
UiPath Agentic Automation Capabilities and OpportunitiesDianaGray10
Learn what UiPath Agentic Automation capabilities are and how you can empower your agents with dynamic decision making. In this session we will cover these topics:
What do we mean by Agents
Components of Agents
Agentic Automation capabilities
What Agentic automation delivers and AI Tools
Identifying Agent opportunities
❓ If you have any questions or feedback, please refer to the "Women in Automation 2025" dedicated Forum thread. You can find there extra details and updates.
DealBook of Ukraine: 2025 edition | AVentures CapitalYevgen Sysoyev
The DealBook is our annual overview of the Ukrainian tech investment industry. This edition comprehensively covers the full year 2024 and the first deals of 2025.
This is session #4 of the 5-session online study series with Google Cloud, where we take you onto the journey learning generative AI. You’ll explore the dynamic landscape of Generative AI, gaining both theoretical insights and practical know-how of Google Cloud GenAI tools such as Gemini, Vertex AI, AI agents and Imagen 3.
DevOps iş təhlükəsizliyi sizi maraqlandırır? İstər developer, istər təhlükəsizlik mühəndisi, istərsə də DevOps həvəskarı olun, bu tədbir şəbəkələşmək, biliklərinizi bölüşmək və DevSecOps sahəsində ən son təcrübələri öyrənmək üçün mükəmməl fürsətdir!
Bu workshopda DevOps infrastrukturlarının təhlükəsizliyini necə artırmaq barədə danışacayıq. DevOps sistemləri qurularkən avtomatlaşdırılmış, yüksək əlçatan və etibarlı olması ilə yanaşı, həm də təhlükəsizlik məsələləri nəzərə alınmalıdır. Bu səbəbdən, DevOps komandolarının təhlükəsizliyə yönəlmiş praktikalara riayət etməsi vacibdir.
https://ncracked.com/7961-2/
Note: >> Please copy the link and paste it into Google New Tab now Download link
Free Download Wondershare Filmora 14.3.2.11147 Full Version - All-in-one home video editor to make a great video.Free Download Wondershare Filmora for Windows PC is an all-in-one home video editor with powerful functionality and a fully stacked feature set. Filmora has a simple drag-and-drop top interface, allowing you to be artistic with the story you want to create.Video Editing Simplified - Ignite Your Story. A powerful and intuitive video editing experience. Filmora 10 hash two new ways to edit: Action Cam Tool (Correct lens distortion, Clean up your audio, New speed controls) and Instant Cutter (Trim or merge clips quickly, Instant export).Filmora allows you to create projects in 4:3 or 16:9, so you can crop the videos or resize them to fit the size you want. This way, quickly converting a widescreen material to SD format is possible.
🌐 𝗢𝗦𝗪𝗔𝗡 𝗦𝘂𝗰𝗰𝗲𝘀𝘀 𝗦𝘁𝗼𝗿𝘆 🚀
𝗢𝗺𝗻𝗶𝗹𝗶𝗻𝗸 𝗧𝗲𝗰𝗵𝗻𝗼𝗹𝗼𝗴𝘆 is proud to be a part of the 𝗢𝗱𝗶𝘀𝗵𝗮 𝗦𝘁𝗮𝘁𝗲 𝗪𝗶𝗱𝗲 𝗔𝗿𝗲𝗮 𝗡𝗲𝘁𝘄𝗼𝗿𝗸 (𝗢𝗦𝗪𝗔𝗡) success story! By delivering seamless, secure, and high-speed connectivity, OSWAN has revolutionized e-𝗚𝗼𝘃𝗲𝗿𝗻𝗮𝗻𝗰𝗲 𝗶𝗻 𝗢𝗱𝗶𝘀𝗵𝗮, enabling efficient communication between government departments and enhancing citizen services.
Through our innovative solutions, 𝗢𝗺𝗻𝗶𝗹𝗶𝗻𝗸 𝗧𝗲𝗰𝗵𝗻𝗼𝗹𝗼𝗴𝘆 has contributed to making governance smarter, faster, and more transparent. This milestone reflects our commitment to driving digital transformation and empowering communities.
📡 𝗖𝗼𝗻𝗻𝗲𝗰𝘁𝗶𝗻𝗴 𝗢𝗱𝗶𝘀𝗵𝗮, 𝗘𝗺𝗽𝗼𝘄𝗲𝗿𝗶𝗻𝗴 𝗚𝗼𝘃𝗲𝗿𝗻𝗮𝗻𝗰𝗲!
What Makes "Deep Research"? A Dive into AI AgentsZilliz
About this webinar:
Unless you live under a rock, you will have heard about OpenAI’s release of Deep Research on Feb 2, 2025. This new product promises to revolutionize how we answer questions requiring the synthesis of large amounts of diverse information. But how does this technology work, and why is Deep Research a noticeable improvement over previous attempts? In this webinar, we will examine the concepts underpinning modern agents using our basic clone, Deep Searcher, as an example.
Topics covered:
Tool use
Structured output
Reflection
Reasoning models
Planning
Types of agentic memory
30B Images and Counting: Scaling Canva's Content-Understanding Pipelines by K...ScyllaDB
Scaling content understanding for billions of images is no easy feat. This talk dives into building extreme label classification models, balancing accuracy & speed, and optimizing ML pipelines for scale. You'll learn new ways to tackle real-time performance challenges in massive data environments.
How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...ScyllaDB
This talk shares how Discord scaled their message search infrastructure using Rust, Kubernetes, and a multi-cluster Elasticsearch architecture to achieve better performance, operability, and reliability, while also enabling new search features for Discord users.
FinTech - US Annual Funding Report - 2024.pptxTracxn
US FinTech 2024, offering a comprehensive analysis of key trends, funding activities, and top-performing sectors that shaped the FinTech ecosystem in the US 2024. The report delivers detailed data and insights into the region's funding landscape and other developments. We believe this report will provide you with valuable insights to understand the evolving market dynamics.
Many MSPs overlook endpoint backup, missing out on additional profit and leaving a gap that puts client data at risk.
Join our webinar as we break down the top challenges of endpoint backup—and how to overcome them.
copy & paste 👉 🟠➤➤🡇 https://filedownloadx.com/download-link/
Wondershare Dr.Fone Crack is a comprehensive mobile phone management and recovery software designed to help users recover lost data, repair system issues, and manage mobile devices. It supports both Android and iOS platforms, offering a wide range of features aimed at restoring files, repairing software problems, and backing up or transferring data.
[Webinar] Scaling Made Simple: Getting Started with No-Code Web AppsSafe Software
Ready to simplify workflow sharing across your organization without diving into complex coding? With FME Flow Apps, you can build no-code web apps that make your data work harder for you — fast.
In this webinar, we’ll show you how to:
Build and deploy Workspace Apps to create an intuitive user interface for self-serve data processing and validation.
Automate processes using Automation Apps. Learn to create a no-code web app to kick off workflows tailored to your needs, trigger multiple workspaces and external actions, and use conditional filtering within automations to control your workflows.
Create a centralized portal with Gallery Apps to share a collection of no-code web apps across your organization.
Through real-world examples and practical demos, you’ll learn how to transform your workflows into intuitive, self-serve solutions that empower your team and save you time. We can’t wait to show you what’s possible!
Future-Proof Your Career with AI OptionsDianaGray10
Learn about the difference between automation, AI and agentic and ways you can harness these to further your career. In this session you will learn:
Introduction to automation, AI, agentic
Trends in the marketplace
Take advantage of UiPath training and certification
In demand skills needed to strategically position yourself to stay ahead
❓ If you have any questions or feedback, please refer to the "Women in Automation 2025" dedicated Forum thread. You can find there extra details and updates.
4. Attempt #1: Standard library
Everyone told me to use the standard library, let's use it.
Index page says hello
Secret message page requires key
func main() {
http.HandleFunc("/", indexHandler)
http.HandleFunc("/secret/message", requireKey(secretMessageHandler))
http.ListenAndServe(":8000", nil)
}
func indexHandler(w http.ResponseWriter, r *http.Request) {
io.WriteString(w, "hello world")
}
5. Secret message
func secretMessageHandler(w http.ResponseWriter, r *http.Request) {
io.WriteString(w, "42")
}
Here's a way to write middleware with just the standard library:
func requireKey(h http.HandlerFunc) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
if r.FormValue("key") != "12345" {if r.FormValue("key") != "12345" {
http.Error(w, "bad key", http.StatusForbidden)
return
}
h(w, r)
}
}
In main.go:
http.HandleFunc("/secret/message", requireKey(secretMessageHandler))
6. There's been a change of plans...
We were hard-coding the key, but your boss says now we need to check Redis.
Let's just make our Redis connection a global variable for now...
var redisDB *redis.Client
func main() {
redisDB = ... // set up redis
}
func requireKeyRedis(h http.HandlerFunc) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
key := r.FormValue("key")
userID, err := redisDB.Get("auth:" + key).Result()userID, err := redisDB.Get("auth:" + key).Result()
if key == "" || err != nil {if key == "" || err != nil {
http.Error(w, "bad key", http.StatusForbidden)
return
}
log.Println("user", userID, "viewed message")
h(w, r)
}
}
7. Just one quick addition...
We need to issue temporary session tokens for some use cases, so we need to check if
either a key or a session is provided.
func requireKeyOrSession(h http.HandlerFunc) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
key := r.FormValue("key")
// set key from db if we have a session
if session := r.FormValue("session"); session != "" {if session := r.FormValue("session"); session != "" {
var err error
if key, err = redisDB.Get("session:" + session).Result(); err != nil {if key, err = redisDB.Get("session:" + session).Result(); err != nil {
http.Error(w, "bad session", http.StatusForbidden)
return
}
}
userID, err := redisDB.Get("auth:" + key).Result()
if key == "" || err != nil {
http.Error(w, "bad key", http.StatusForbidden)
return
}
log.Println("user", userID, "viewed message")
h(w, r)
}
}
8. By the way...
Your boss also asks:
Can we also check the X-API-Key header?
Can we restrict certain keys to certain IP addresses?
Can we ...?
There's too much to shove into one middleware: so we make an auth package.
package auth
type Auth struct {
Key string
Session string
UserID string
}
func Check(r *http.Request) (auth Auth, ok bool) {
// lots of complicated checks
}
9. What about Redis?
We need to reference the DB from our new auth package as well.
Should we pass the connection to Check?
func Check(redisDB *redis.Client, r *http.Request) (Auth, bool) { ... }
What happens we need to check MySQL as well?
func Check(redisDB *redis.Client, archiveDB *sql.DB, r *http.Request) (Auth, bool) { ... }
Your boss says MongoDB is web scale, so that gets added too.
func Check(redisDB *redis.Client, archiveDB *sql.DB, mongo *mgo.Session, r *http.Request) (Auth, bool) { ...
This isn't going to work...
10. How about an init method?
Making a global here too?
var redisDB *redis.Client
func Init(r *redis.Client, ...) {
redisDB = r
}
That doesn't solve our arguments problem. Let's shove them in a struct.
package config
type Context struct {
RedisDB *redis.Client
ArchiveDB *sql.DB
...
}
Init with this guy?
auth.Init(appContext)
Who inits who?
What about tests?
11. Just one more thing...
Your boss says it's vital that we log every request now, and include the key and user ID if
possible.
It's easy to write logging middleware, but how can we make our logger aware of our
Auth credentials?
12. Session table
Let's try making a global map of connections to auths.
var authMap map[*http.Request]*auth.Auth
Then populate it during our check.
func requireKeyOrSession(h http.HandlerFunc) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
...
a, ok := auth.Check(dbContext, r)
authMapMutex.Lock()
authMap[r] = &a
...
}
}
Should work, but will our *http.Requests leak? We need to make sure to clean them up.
What happens when we need to keep track of more than just Auth?
How do we coordinate this data across packages? What about concurrency?
(This is kind of how gorilla/sessions works)
14. Attempt #2: Goji
Goji is a popular web micro-framework. Goji handlers take an extra parameter called
web.C (probably short for Context).
c.Env is a map[interface{}]interface{} for storing arbitrary data — perfect for our auth
token! This used to be a map[string]interface{}, more on this later.
Let's rewrite our auth middleware for Goji:
func requiresKey(c *web.C, h http.Handler) http.Handler {
fn := func(w http.ResponseWriter, r *http.Request) {
a := c.Env["auth"]
if a == nil {
http.Error(w, "bad key", http.StatusForbidden)
return
}
h.ServeHTTP(w, r)
}
return http.HandlerFunc(fn)
}
15. Goji groups
We can set up groups of routes:
package main
import (
"github.com/zenazn/goji"
"github.com/zenazn/goji/web"
)
func main() {
...
secretGroup := web.New()
secretGroup.Use(requiresKey)
secretGroup.Get("/secret/message", secretMessageHandler)
goji.Handle("/secret/*", secretGroup)
goji.Serve()
}
This will run our checkAuth for all routes under /secret/.
17. Downside: Goji-flavored context
Let's say we want to re-use our auth package elsewhere, like a batch process.
Do we want to put our database connections in web.C, even if we're not running a web
server? Should all of our internal packages be importing Goji?
package auth
func Check(c web.C, session, key string) bool {
// How do we call this if we're not using goji?
redisDB, _ := c.Env["redis"].(*redis.Client) // kind of ugly...
}
Having to do a type assertion every time we use this DB is annoying. Also, what happens
when some other library wants to use this "redis" key?
18. Downside: Groups need to be set up once, in main.go
Defining middleware for a group is tricky. What happens if you have code like...
package addon
func init() {
goji.Get("/secret/addon", addonHandler) // will secretGroup handle this?
}
Everything works will if your entire app is set up in main.go, but in my experience it's
very finicky and hard to reason about handlers that are set up in other ways.
20. Attempt #3: kami & x/net/context
What is x/net/context?
It's an almost-standard package for sharing context across your entire app.
Includes facilities for setting deadlines and cancelling requests.
Includes a way to store data similar to Goji's web.C.
Immutable, must be replaced to update
Check out this official blog post, which focuses mostly on x/net/context for cancellation:
blog.golang.org/context(https://blog.golang.org/context)
Quick example:
ctx := context.Background() // blank context
ctx = context.WithValue(ctx, "my_key", "my_value")
fmt.Println(ctx.Value("my_key").(string)) // "my_value"
21. kami
kami is a mix of HttpRouter, x/net/context, and Goji, with a very simple middleware
system included.
package main
import (
"fmt"
"net/http"
"github.com/guregu/kami"
"golang.org/x/net/context"
)
func hello(ctx context.Context, w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hello, %s!", kami.Param(ctx, "name"))
}
func main() {
kami.Get("/hello/:name", hello)
kami.Serve()
}
22. Example: sharing DB connections
import "github.com/guregu/db"
I made a simple package for storing DB connections in your context. At Gunosy, we use
something similar. db.OpenSQL() returns a new context containing a named SQL
connection.
func main() {
ctx := context.Background()
mysqlURL := "root:hunter2@unix(/tmp/mysql.sock)/myCoolDB"
ctx = db.OpenSQL(ctx, "main", "mysql", mysqlURL)ctx = db.OpenSQL(ctx, "main", "mysql", mysqlURL)
defer db.Close(ctx) // closes all DB connectionsdefer db.Close(ctx) // closes all DB connections
kami.Context = ctxkami.Context = ctx
kami.Get("/hello/:name", hello)
kami.Serve()
}
kami.Context is our "god context" from which all request contexts are derived.
23. Example: sharing DB connections (2)
Within a request, we use db.SQL(ctx, name) to retrieve the connection.
func hello(ctx context.Context, w http.ResponseWriter, r *http.Request) {
mainDB := db.SQL(ctx, "main") // *sql.DBmainDB := db.SQL(ctx, "main") // *sql.DB
var greeting string
mainDB.QueryRow("SELECT content FROM greetings WHERE name = ?", kami.Param(ctx, "name")).
Scan(&greeting)
fmt.Fprintf(w, "Hello, %s!", greeting)
}
24. Tests
For tests, you can put a mock DB connection in your context.
main_test.go:
import _ "github.com/mycompany/testhelper"
testhelper/testhelper.go:
import (
"github.com/guregu/db"
"github.com/guregu/kami"
_ "github.com/guregu/mogi"
)
func init() {
ctx := context.Background()
// use mogi for tests
ctx = db.OpenSQL("main", "mogi", "")
kami.Context = ctx
}
25. How does it work?
Because context.Value() takes an interface{}, we can use unexported type as the key to
"protect" it. This way, other packages can't screw with your data. In order to interact with
a database, you have to use the exported functions like OpenSQL, and Close.
package db
import (
"database/sql"
"golang.org/x/net/context"
)
type sqlkey string // lowercase!
// SQL retrieves the *sql.DB with the given name or nil.
func SQL(ctx context.Context, name string) *sql.DB {
db, _ := ctx.Value(sqlkey(name)).(*sql.DB)
return db
}
BTW: This is why Goji switched its web.C from a map[string]interface{} to
map[interface{}]interface{}.
26. Middleware
kami has no concept of middleware "groups". Middleware is strictly hierarchical.
For example, a request for /secret/message would run the middleware registered under
the following paths in order:
/
/secret/
/secret/message
This means that you can define your paths anywhere and still get predictable
middleware behavior.
kami.Use("/secret/", requireKey)
27. Middleware (2)
kami.Middleware is defined as:
type Middleware func(context.Context, http.ResponseWriter, *http.Request) context.Context
The context you return will be used for the next middleware or handler.
Unlike Goji, you don't have control of how the next handler will be called. But, you can
return nil to halt the execution chain.
28. Middleware (3)
import "github.com/mycompany/auth"
func init() {
kami.Use("/", doAuth)
kami.Use("/secret/", requiresKey)
}
// doAuth returns a new context with the appropiate auth object inside
func doAuth(ctx context.Context, w http.ResponseWriter, r *http.Request) context.Context {
if a, err := auth.ByKey(ctx, r.FormValue("key")); err == nil {
// put auth object in context
ctx = auth.NewContext(ctx, a)
}
return ctx
}
// requiresKey stops the request if we don't have an auth object
func requiresKey(ctx context.Context, w http.ResponseWriter, r *http.Request) context.Context {
if _, ok := auth.FromContext(ctx); !ok {
http.Error(w, "bad key", http.StatusForbidden)
return nil // stop request
}
return ctx
}
29. Hooks
kami provides special hooks for logging and recovering from panics, kami.LogHandler
and kami.PanicHandler.
Handling panics.
kami.PanicHandler = func(ctx context.Context, w http.ResponseWriter, r *http.Request) {
err := kami.Exception(ctx)
a, _ := auth.FromContext(ctx)
log.Println("panic", err, a)
}
Logging request statuses. Notice how the function signature is different, it takes a writer
proxy that includes the status code.
kami.LogHandler = func(ctx context.Context, w mutil.WriterProxy, r *http.Request) {
a, _ := auth.FromContext(ctx)
log.Println("access", w.Status(), r.URL.Path, "from:", a.Key, a.UserID)
}
LogHandler will run after PanicHandler, unless LogHandler is the one panicking.
30. Graceful
This is the "Goji" part of kami. Literally copy and pasted from Goji.
kami.Serve() // works *exactly* like goji.Serve()
Supports Einhorn for graceful restarts.
Thank you, Goji.
31. Downsides
kami isn't perfect. It is rather inflexible and may not fit your needs.
You can't define separate groups of middleware, or separate groups of handlers,
everything is global. You could mount kami.Handler() outside of "/" and use another
router...
You can't register middleware under wildcard paths: kami.Use("/user/:id/profile",
middleware) won't work. Register it under /user/ and do your best.
I will probably fix these issues eventually. Might have to fork HttpRouter...
Pull requests are always welcome.
32. Production ready!
We use kami to power the Gunosy API and it works just fine!
Switching to x/net/context eliminates nearly all global variables.
No more somepkg.Init() madness.
Easy to test: just put mocks inside your context.
Check it out!