git push heroku master

heroku-codeI still get a little chill down my spine every time I type “git push heroku master.” Why? I really do believe that someday all software deployments will be this easy, even in a private corporate environment.

For those of you not familiar with the magic of Heroku, now is a good time to check it out. Heroku is a mature Platform-as-a-Service (PaaS) offering that has been operating for almost seven years – the last four under the ownership of

The basic unit of abstraction in the Heroku platform is a “dyno.” Unlike a virtual machine, which often contains multiple apps, a dyno IS a single instance of an app. As such, it represents a much finer grained level of abstraction than a virtual machine. This is much more in line with how apps really get scaled and managed. For example, you might only need one database instance, two web servers, but three or more instances of your business logic. With Heroku, it’s easy to dynamically scale up each individual component of the larger system using dynos. The shared infrastructure built in to Heroku’s dynos also means you are not burdened with managing the underlying operating system and infrastructure like you are when everything is inside VMWare or raw Amazon Machines Instances (AMIs).

Heroku uses git to version and deploy your code so it’s very familiar to anyone used to command line development tools. The magic, however, comes with the ‘git push heroku master’ command which starts the deployment pipeline processing that detects what programming language you are using and auto-magically downloads and bundles up all the necessary third party packages needed to launch, run, and manage your app.

Once deployed, you can continue to enhance your system by selecting third party add-ons which add powerful functionality to your apps. I personally use MongoLab (for MongoDB), Logentries (for Logging), and Auth0 (for SSO and User Management) but there are over 150 other useful add-ons to choose from for functions such as search, analytics, payment processing, and mobile infrastructure.

I have tested the Solace Node.js client libraries in Heroku as follows

1) create a simple pub/sub client app using the Solace JavaScript API and deploy it to Heroku
$ heroku login
$ npm install node-solclientjs- (get this from )
$ cd node_modules/solclient
$ vim example/pub.js examples/sub.js [edit first line to require("../lib/solclientjs.js") ] $ vim example/arguments.json [edit to point to your own Solace Messaging Appliance or one of the public message-vpns on the internet] $ git init
$ git add .
$ git commit -m "init"
$ heroku create
$ git push heroku master

2) start a shell in one dyno and subscribe
$ heroku run bash
> cd example
> node sub.js

3) start a shell in another dyno and publish
$ heroku run bash
> cd example
> node pub.js

Solace and Heroku are a great match: easy virtualized software meets easy virtualized hardware.