SmartPlatform and Node.js on

September 16, 2010 - by konobikun

Recently there have been multiple tweets, IRC conversations and blog articles describing our SmartPlatform and its correlation to the recent service that we ran as an alpha release at node knockout. There was quite a bit of confusion as to what the service is and how it aligns with the SmartPlatform and also what the SmartPlatform is and isn't.

The SmartPlatform is an implementation of a vision where an application loses its understanding of the "machine" and becomes truly portable. Imagine a world where you push your code into the "cloud" and your app scales, has redundancy, secure data storage and even the ability to have content served locally via a global CDN. This is what we have been working towards with the SmartPlatform.

Early on, Joyent decided that the way to achieve this was use JavaScript on the server as the environment on which to execute application code. Over time it appears that this has been the correct approach, with the popularity of Node.js and other server-side JavaScript runtimes increasing.

The current SmartPlatform beta is built upon the fantastic work that was done by James at Reasonably Smart and has been improved and developed upon since the acquisition. SmartPlatform is built upon the Mozilla SpiderMonkey engine along with bindings written in Perl which provide a feature rich set of extensions using libraries provided by CPAN. This has allowed us to prove out the concept and provided us with knowledge of where we need to concentrate our efforts.

In comparison, our service is a customized version of our SmartMachine designed to take advantage of some core features of SmartOS such as SMF and RBAC. Similar to our mysql, zxtm and riak flavours, a zone is a full SmartOS container that uses git to manage deployment of your application while SMF keeps everything running. RBAC allows us to delegate functionality that would otherwise require root access such as binding to port 80, restarting services or package installation.

Through the alpha that we supplied during node knockout, we saw more and more indications that users wanted to use more as a full platform rather than as yet another "machine". We believe that this has further validated our vision behind the SmartPlatform and that our efforts in this area should be continued on and expanded further.

Joyent has seen Node.js as a valuable platform on which to continue our use of JavaScript on the server-side and we will be investing time and putting considerable engineering effort behind making Node.js a world class runtime to use. This will include adding more transparency, observability and profiling tools to v8 and Node.js using technologies like DTrace.

One example of the work we have done in this area is the nodeKO leaderboard that was made available for users of the service. We added user defined DTrace probes to Node.js marking the initiation and destruction of HTTP requests and then mapping where those requests were coming from using geolocation tools. Bryan has posted about what we got up to on his blog.

With this abundance of tooling and instrumentality, it only makes sense that we would wish to build upon such a strong base. As such, we will be moving towards building our SmartPlatform upon the v8 engine and Node.js. While this marks a departure from our current SmartPlatform implementation, we believe that having this full instrumentality is fundamental to being "Smart" about the platform and the wealth of things that we can do with it.

As with our current implementation, the SmartPlatform will continue to be under a permissive open source licence and we are dedicated to making the platform transparent and portable. Over time we'll be providing more information and updates on the SmartPlatform and its progress.

In the meantime, we're taking feedback from those who were using the service during node knockout and are continuing to improve the product to offer it as a full service. We should have updates about that soon.

On a personal note, I've spent several months working on the SmartPlatform and am very proud of the work that I and others (Rob, Jim, James and more) have done on the platform. We ran another closed beta and found a dramatic improvement with the developer experience and we've deployed several core business applications on top of the platform. While we've invested a lot of time and effort into this current implementation, we are excited to be bringing these ideas forward by building on Node.js. I'm also extremely pleased to have been asked to lead the charge on our PaaS products (including SmartPlatform and and am looking forward to working with all of my fellow joyeurs to provide a truly unique and compelling experience for our users.