Every week or two we spread the word of Node.js and the incredible things it can do by profiling creative, interesting and fun uses of Node.js in various products and projects. We call it “In the Loop.”
This time we’re chatting with the Phil Whelan about of Stackato, the application platform for creating a private, secure, flexible Platform-as-a-Service (PaaS) using any language on any stack on any cloud. Stackato is comprised of many components written in many languages, including Node.js, Ruby, Go, Python, Perl and Tcl components.
Can you give us the rundown on Stackato? What is it and how does it work?
Phil Whelan: Some developers are familiar with Heroku or EngineYard, which are Platform-as-a-Service, or “PaaS” for short. Stackato is Platform-as-a-Service that you can deploy and manage yourself. You can run it on your laptop or at scale in production. Developers just push their code to this platform and Stackato takes care of installing dependencies, managing the framework, provisioning databases, message queues or caching layers. Your application and databases are hosted within the Stackato cluster, and scaling up an application is one-click or an API call.
Developers (whether on Windows, Linux or Mac) can run Stackato on their laptops during development and be sure that their code will deploy to QA and production systems without modification. They can even test scaling during development!
What inspired development of this product?
Phil Whelan: We have supported dynamic programming languages, such as Perl, Python and Tcl for many years. We have also been very focused on open-source for enterprise. This is similar to what StrongLoop is doing with Node.js. We have built enterprise versions of Perl, Python and Tcl and we are proud to say that 97% of Fortune 1000 companies use ActiveState products.
Several years ago, we had been looking at better ways to deploy many of the programming languages we support and we were building a PaaS solution when VMware released the Cloud Foundry open-source PaaS project. We knew this project would get wide adoption and we knew we could make an enterprise-ready version and be a catalyst for wider adoption of Cloud Foundry within large organizations. Adoption by large organizations is key to the success of any PaaS solution.
Over the past few years we have succeeded in bringing many large enterprise customers into the Cloud Foundry ecosystem via Stackato. We will remain compatible with the Cloud Foundry open-source project, so that our customers retain the option for portability throughout the Cloud Foundry ecosystem.
Stackato allows you to create using any language on any stack on any cloud. How did you manage to build this level of diversity?
Phil Whelan:The original foundation for multiple language and framework support in Stackato came from the Cloud Foundry project. ActiveState added Perl and Python to Stackato and contributed the Python support back to the Cloud Foundry project.
We have since done a great deal of work on all areas of language and framework support. An important language for enterprise is obviously Java, but Node.js is something enterprises are definitely interested in. To date, many large organizations do not support languages such as Node.js because they do not have the operational resources to support additional languages outside of their core expertise. We are pleased to see Stackato give developers this flexibility without burdening operations teams.
Moving forward we are seeing wider adoption of Heroku’s buildpacks. This a nice way to get any language or framework installed at deployment time into the PaaS. For instance, I can now deploy Racket apps https://github.com/activekjw/stackato-racket-example, which is not natively supported by Stackato, by using a buildpack. Buildpacks are also a great way to deploy a Node.js app using StrongLoop’s distribution, with near zero effort.
Node.js is one of the languages that you have made work with Stackato. At what point did you determine Node.js would make the cut?
Phil Whelan: Including Node.js was a no-brainer and was part of the original Cloud Foundry implementation. It is very popular and does certain things very well. Regardless of its current popularity, the *rate* at which it is gaining traction, means it would be foolish to ignore it.
In fact, Node.js is a core part of Stackato itself. The Router, which sends HTTP requests to the appropriate web application and load-balances across multiple web application instances, is written in Node.js.
The original Cloud Foundry router was written in Ruby, which utilized an additional Nginx process. We found Ruby to be the wrong language choice for such a component. Node.js is great for writing a HTTP proxy. There are a lot of cool features we want to add to this component of Stackato and Node.js gives us the ability to do this.
Were there any challenges bringing Node.js into the fold?
Phil Whelan: Since the router was a critical part of Stackato and we had no other moving parts within Stackato that were built with Node.js, we obviously had consider it carefully. Was it reliable? Would it still be supported in X years? Could it perform well under high load?
Jamie Paton, who oversaw all development in this area, pointed out that big brand names such as LinkedIn, Ebay and Walmart were already using it in production, even for their full stack. There were even PaaS solutions out there that were being built purely in Node.js. There is a great infographic that shows the popularity of Node.js infographic that shows the popularity of Node.js
Aside from the initial obstacle of proving that Node.js was something we could rely on, the integration of Node.js was a pain free process. The tooling and binaries make installing and using Node.js very simple. There is an active module ecosystem at http://modulecounts.com/, which means that most components are already available. Therefore, you find yourself re-using code instead of reinventing the wheel.
We were quickly able to prototype a pure Node.js router and we were pleased to see it perform 10x better than the legacy-router, which was a combination of Nginx and Ruby. Now we have just one process, instead of two.
With Node.js we were also able to provide WebSocket and SPDY support before any other Cloud Foundry based PaaS. We have also recently added some new features to the router. This includes custom SSL certificates without downtime, statistics and sticky session support. This would have been much more difficult to do in a compiled router like Nginx, Golang or HAProxy.
Technically, one of the more challenging aspects has been overcoming system limits and tuning Node.js for maximum performance. This includes use of the cluster module to allow the router to work across multiple processes. We have also made kernel tweaks and tuned TCP parameters similar to this to squeeze as much performance as possible out of Node.js.
We are looking forward to Node.js 0.12, which promises to deliver even more HTTP processing performance.
Do you have recommendations for anyone considering Node.js for a project? And does Stackato have any future plans involving Node.js?
Phil Whelan: There are many moving parts involved in running a PaaS. Currently, Stackato is built using Ruby, Python, Perl, Go, Node.js and Tcl (there may be others I’ve missed). We are not just supporting polyglot, we are building in a very polyglot way. I think we will see more Stackato components being written in Node.js in the future. We already have a second component, called Harbor, which is a service for provisioning UDP and TCP port for applications.
What we like about Node.js is how easy it is to start playing with it and with PaaS it is very easy to deploy. I have seen customers write just a few lines of Node.js and just push it to Stackato. Within seconds they have a highly scalable proxy running in their private cloud providing support between two legacy systems.
For anyone starting out in Node.js I would recommend taking a look at Mozilla’s “A Node.js Holiday Season.”
What does the future hold for Stackato?
Phil Whelan: The PaaS space is still young and rapidly developing. We are glad to have our foot in the door and be seen by enterprise as the current best option, but things change quickly in new markets. Our team is growing quickly and we see plenty of potential in where things are going. Also, our customers do provide a good basis for our direction. Unfortunately I cannot share our roadmap. What I can say is that we will continue to provide enterprise support for the Cloud Foundry ecosystem and will retain compatibility with Cloud Foundry.
Phil, thanks for chatting with us.
You can check out Stackato’s PaaS via their web page and get started in minutes.
If you have a cool Node.js project or product you think we should profile, reach out to us at email@example.com and we’d be happy to get you In the Loop.
- What’s in the upcoming Node v0.12 release? Six new features, plus new and breaking APIs.
- Ready to develop APIs in Node.js and get them connected to your data? Check out the Node.js LoopBack framework. We’ve made it easy to get started either locally or on your favorite cloud, with a simple npm install.
- Need training and certification for Node? Learn more about both the private and open options StrongLoop offers.