Repose is an open-source RESTful HTTP proxy service that scales to the cloud. Repose provides a solution to common API processing tasks such as rate limiting, client authentication, translation, API validation, versioning and logging so web service developers can focus on the unique features of their services.
Repose Within Rackspace
To understand Repose better, let’s examine how we use Repose here at Rackspace. One of our internal applications of Repose has been to simplify development and use of Atom Hopper, another of our open-sourced products that I’ve blogged about before. We use Atom Hopper as a key tool to collect data from our deployment of OpenStack. We have several internal teams that want to access this data as well as to publish additional data into Atom Hopper. Naturally, all of this requires Atom Hopper to perform basic functions such as authentication, rate limiting and logging. This is where Repose steps in. Repose already has components that can do this for Atom Hopper, or for any other web based service for that matter. This lets the Atom Hopper team focus on just the core pieces of Atom Hopper while Repose deals with general-purpose functions like authentication and rate limiting. This relationship with Repose works for other web services developed by teams within Rackspace: those developers focus on their own web service and let Repose do the other tasks that almost every web service needs. It’s no longer necessary for every development team to re-invent the wheel for client authentication, rate limiting and such functions.
In the same way, you can use Repose to help you focus on your own web-based service. You can use Repose no matter what programming language you used to develop your web service.
Benefits And How Repose Works
Repose’s design gives it several benefits. Repose is:
- Scalable. Repose is incredibly scalable because it is designed to be stateless, allowing state to be distributed across the web.
- Flexible. Repose can be run as an executable JAR, deployed as a WAR file in any Servlet container or deployed on a separate server. Repose’s configuration allows a user to define which components to use and details for each component.
- Extensible. Repose’s functionality is delivered as separately-configurable components. New components can easily be added to Repose. You can see an ever-growing list of Repose components in our wiki.
- High performance. Repose can handle high loads with high accuracy.
- Configurable. Repose’s components can be configured easily and any changes to the configuration are automatically re-loaded.
Integration patterns are technology-independent designs that are robust and re-usable. Repose is a platform that can be used to implement integration patterns. In particular, Repose uses these two patterns:
- Pipes and Filters: Repose implements the pipes and filters pattern by providing a way of constructing a route by creating a chain of filters. Requests are passed through the chain so that one filter’s output becomes the next filter’s input. This pipeline structure is analogous to the UNIX pipe command. The advantage of the pipeline approach is that it enables you to combine services, some of which can be external to the application, to create more complex forms of message processing.
- Message Router: Repose implements the message router pattern as a filter that consumes messages from a single consumer endpoint and then redirects them to the appropriate target endpoint, based on a specific decision criterion. A message router is concerned only with redirecting messages; it does not modify the message content. Repose acts as an intermediate proxy and routes accordingly. Any component can make Repose route.
One year ago we launched Repose as open source software. We’ve been very happy with Repose in production and welcome your feedback.
Getting Started With Repose
To learn more about Repose, the Open Repose website is your starting point providing links to the source code in GitHub. This is also the right place to find our documentation, including an FAQ and wiki; the wiki has the most current information. You might also be interested in a walkthrough on setting up Repose to use rate limiting over on our DevOps blog.