Apigee Edge now supports Node.js and has open sourced Volos, a project containing a set of API management modules.
Apigee has recently added support for Node.js and NPM modules which can be used for building new APIs, back-ends for mobile applications, mashups and composite services. We have interviewed Greg Brail, Chief Architect at Apigee, in order to find out more about what developers can do with Node.js on the Apigee platform.
InfoQ: What exactly can one do with JavaScript/Node.js while programming against the Edge platform?
GB: Specifically, what you can do right now is write web apps in Node.js (using the standard "http" and "https" modules) and deploy them to Apigee Edge, either in our cloud or in your own data center. The apps that you deploy have access to a complete Node.js environment, including the ability to use the vast majority of modules hosted in NPM. (There may still be some incompatibilities in our environment -- for instance, we don't support modules that depend on native C or C++ code.)
Since those scripts run inside Edge like our existing API proxies, they support the various deployment capabilities of Edge, like the ability to deploy different versions to different virtual environments from the same UI and API, and the ability to deploy across multiple geographic regions automatically. We collect analytics on all the API calls that pass through Edge to the Node.js program, so you can analyze the traffic and even produce custom reports from custom data.
Plus, you can combine Node.js scripts with our existing library of policies, including policies for security (like OAuth), traffic management (such as quotas and spike arresting), security threat detection, and more.
InfoQ: I noticed you also support a number of Objective-C, Java, .NET, Ruby, and JavaScript SDKs. Can these be used to build the same functionality for the Edge platform as you can do with Node.js? What are the differences?
GB: The Edge platform has always contained a runtime that can execute API proxies defined using our own configuration schemas, and now it contains a runtime that can execute HTTP servers built using Node.js. The SDKs, on the other hand, are clients for the various APIs that are provided by Edge for direct use by clients. For instance, the SDKs make it possible to build an app for the various mobile platforms and others that can use Edge as a back end for things like data storage and push notification.
In other words, Edge is a server, and the Node.js capability is a new way to deploy code to the server. The server also contains a bunch of canned APIs that provide functionality critical to modern apps, and the SDKs are a way for clients to easily access those APIs.
Apigee has also open sourced Volos, a set of Node.js modules providing support for API OAuth 2.0 authorization, key validation, quota management and caching. Volos can run independently or it can be setup to communicate with Apigee Edge to get support in managing developers, apps and APIs, or Volos apps can be deployed directly on the Apigee platform.
Comparing Volos with Edge, Brail said:
One of the things that Volos is designed to do is to take advantage of many of the capabilities of Edge. For instance, the OAuth and quota modules in Volos can run locally against a Redis database, but they can also communicate with Edge, which means that it uses the OAuth capabilities that way. And of course, if you deploy a Volos application to run on Edge, it can use those capabilities directly. So, it's not necessarily an either / or situation.
With that said, Edge has a lot of deep capabilities around sophisticated management of things like developers, applications, and collections of each, not to mention tricky things like support for distributed quotas and deep analytics.
Regarding Apigee’s plans for Volos’ future, Brail added:
We plan to add more modules to Volos so that it's the best set of tools to use to build production-quality APIs in Node.js. And of course, we are going to make sure that Edge is the best place to run those apps, and make sure that when running on Edge the apps can take advantage of all the capabilities and serviceability of the Edge product.
Among others, Apigee is providing support for building and managing APIs which stand between new or already existing back-ends or data services and clients.