Scaling Real-time Apps on Cloud Foundry Using Node.js and RabbitMQ

by January 31, 2013

In the previous blog Scaling Real-time Apps on Cloud Foundry Using Node.js and Redis, we used Redis as a ‘session store’ and also as a ‘pub-sub’ service for chat messages. But in many enterprise grade real-time apps, you may want to use RabbitMQ instead of Redis to do pub-sub because of the reliability and features that comes out-of-the-box in RabbitMQ. This is especially true for financial or Bank apps like Stock Quote apps where it is critical to protect and deliver each-and-every message AND do it as quickly as possible.
So, in this blog, we will start from Scaling Real-time Apps on Cloud Foundry Using Node.js and Redis and simply replace Redis with RabbitMQ pubsub.

Build a Real Time Activity Stream on Cloud Foundry with Node.js, Redis and MongoDB 2.0 – Part III

by September 11, 2012

In Part II of this series, we covered the architecture needed for persisting the Activity Streams to MongoDB and fanning it out in real-time to all the clients using Redis PubSub.

Since then, some exciting new Node.js features for Cloud Foundry were launched. In addition, the MongoDB version on Cloud Foundry has been upgraded to 2.0.
In this blog post we will cover how to:

Use Mongoose-Auth to store basic user information, including information from Facebook, Twitter, and Github, and how we made this module with native dependencies work on Cloud Foundry
Use Mongo GridFS and ImageMagick to store user uploaded photos and profile pictures
Perform powerful stream filtering, thanks to new capabilities exposed in MongoDB 2.

New Runtime Module for Node.js Applications

by August 21, 2012

In the previous blog post, Cloud Foundry Now Supports Auto-Reconfiguration for Node.js Applications, we saw that Node.js applications deployed to can be automatically reconfigured to connect to Cloud Foundry services. However, there may be situations where you want to opt-out of that feature to have finer control over service connections or to overcome its limitations. In those cases, your applications would be required to parse JSON-formatted environment variables to perform that same function. While this is not overly complex given that JSON is trivial to parse with JavaScript, you will be required to understand the environment variable names and their payload schema.

Cloud Foundry Now Supports Auto-Reconfiguration for Node.js Applications

by August 14, 2012

Cloud Foundry has long supported auto-reconfiguration for Spring and Ruby applications. Now we are pleased to add auto-reconfiguration support for Node.js applications as well. Deploying Node.js applications to Cloud Foundry previously required parsing of environmental variables and overwriting server and service connection function calls to use Cloud Foundry specific parameters. This approach was not intuitive to developers who just started to use Cloud Foundry to deploy their applications. They would need to consult the documentation and figure out what port and host they need to connect to. Moreover, if an application uses services, developers would need to configure their applications to use the proper service connection parameters.

Future-proofing Your Apps: Cloud Foundry and Node.js

by June 27, 2012

Most real-world applications we ship to consumers or enterprises are multi-year projects. In the cloud era, newer technologies (programming languages, runtimes, frameworks) are created faster than ever. While most of them fail to get any traction, once in a while a technology becomes popular because it solves a problem or set of problems extremely well.
Now in such an era, if you make a large investment for a multi-year project on a PaaS that only supports one technology and some other technology comes along that happens to solve your problem better, then you are stuck. You have unintentionally become a victim of vendor lock-in. The heart of your problem is that your PaaS, and hence your app, was not future-proofed to begin with.

Building a Real-Time Activity Stream on Cloud Foundry with Node.js, Redis and MongoDB–Part II

by June 5, 2012

In Part I of this series, we showed how to start from the node-express-boilerplate app for real-time messaging and integration with third parties and move towards building an Activity Streams Application via Cloud Foundry. The previous app only sent simple text messages between client and server, but an Activity Streams Application processes, aggregates and renders multiple types of activities. For this new version of the application, my requirements were to show the following:

User interactions with the app running on
Custom activities created by users on the app’s landing page
User activities from GitHub such as creating repositories or posting commits

For this reason, I decided to use Activity Strea.

Building a Real Time Activity Stream on Cloud Foundry with Node.js, Redis and MongoDB – Part I

by May 17, 2012

Cloud Foundry provides developers with several choices of frameworks, application infrastructure services and deployment clouds. This approach to providing a platform as a service enables the fast creation of useful cloud applications that take advantage of polyglot programming and multiple data services. As an example of how this enables us to be more productive, I was able to use Node.js, Redis, and MongoDB to create an Activity Streams application in a short time, despite the fact that I mainly develop Web Applications in Ruby. Based on the developer interest after a demo of this application at NodeSummit 2012 and MongoSF 2012,  I was inspired to do a 3 part blog series that fully details the creation, deployment, and scaling of this application on

Cloud Foundry Welcomes Joyent as Community Lead for Node.js

by November 8, 2011

Cloud Foundry has supported Node.js from day one.  Today we are delighted to announce Joyent will become the Cloud Foundry Community Lead for Node.js.  Community Leads bring deep experience and passion for specific technologies to Cloud Foundry.  Joyent will contribute and maintain Node.js support for Cloud Foundry, providing ongoing updates, direction and community engagement. As the open source project owner and home to Node’s core team, Joyent has invested heavily in making Node the leading runtime for data-intensive real-time mobile and web applications for the individual developer and the enterprise.

RabbitMQ + Cloud Foundry: Cloud Messaging that Just Works

by August 9, 2011

Cloud Foundry™ is the industry’s first open platform as a service. Providing a choice of developer frameworks, application services and deployment clouds, Cloud Foundry simplifies application development and makes it faster and easier to build, test, deploy and scale applications. Cloud Foundry already supports multiple application services including MySQL, MongoDB and Redis. And we are working to add more. 
Today, we are pleased to announce an important milestone: the RabbitMQ messaging service, available today as a free public beta. You can get started right away: on, you will find sample applications and guides. If you create a cool application, please let us know and we’ll link to it. And if you get stuck, tell us what we need to get right.