nearForm is part of a new generation of electronic components that you can use like LEGO.

littleBits electronics is a New York-based startup that takes simple electronic components – like lights, speakers and switches – and plugs them together with magnets to create instant circuits that “just work”.

LittleBits Electronics


In the spring of 2014, littleBits took the next step: making it possible to connect your creations up to the web so that you can control them from your smart phone. They chose Node.js as the basis for their cloud platform, because they knew that Node.js would let them build quickly. This is where nearForm came in.

The littleBits system needed to be scalable and automated. Why? A good example is the SMS doorbell. You connect a button, an LED light, and a “cloudbit” sends you an SMS when the button is pressed. Now, imagine 10,000 doorbells, or 100,000, or more, all operating at the same time. Part of nearForm’s job was to ensure that the littleBits cloud can handle this level of concurrency.

nearForm’s experience with large scale Node.js deployments, and our ability to design and manage these systems, gave littleBits the power to launch the cloudbit with confidence.

The founders of nearForm are all parents, and we share a common interest in science education. It was fantastic to help a company make this happen in a very real, tangible way. Needless to say, we had great fun playing with the littleBits hardware – you can even build sound synthesizers!

Ayah Bdeir, the founder of littleBits, is a really inspiring speaker and visionary. This TED talk really captures the essence of what littleBits can achieve:

Here’s how it all works.

First: Node.js gives you the concurrency you need.

It’s no problem for a Node.js server to maintain all those open connections. The lightweight, event-driven architecture means that each piece of cloudbit hardware just has to open a TCP connection to the littleBits cloud, and keep it open. If the connection fails, then the cloudbit simply reopens the connection and keeps going. This ability is really important, as the cloudbit must be kept as simple as possible. It is not feasible technically or commercially to burden the cloudbit with a large, power-hungry CPU.

Second: the littleBits cloud consists of a number of different, independent Node.js server processes.

Each one can scale independently so that changing load can be handled dynamically and cost-effectively. You don’t want your system going slow on Christmas day – that’s the big one. nearForm helped littleBits put together an automation solution to scale the system as needed, in part or in whole. We also validated the entire system up to the top of the hockey-stick growth curve. littleBits said to us, “Does it still work when I add 3 zeros to the concurrent user count?” and we’ve made sure that it does.

Third: Node.js makes it incredibly easy to integrate with outside services.

Integration is an essential aspect of any cloud system. You’ll need a CDN, an email delivery service, Facebook logins, and so on. Then you’ll need integration with lower-level interfaces. For example, littleBits talks to IFTTT, a cloud service that let you define simple “If This, Then That” workflows. In other words: if my doorbell is pressed, send an SMS.

And lastly: the final piece of the puzzle was deployment.

In a microservice system, one of the big advantages is the fact that you can do partial deployments. Need to upgrade your cloudbit protocol, but there are no changes to the user interface? No problem. Leave the user interface service alone. There’s zero risk because you aren’t changing anything. Just redeploy the cloudbit service. This makes for far more resilient and fault tolerant systems. The result: much less downtime.

Compare this approach to traditional monolithic systems, where upgrades and deployments are a high-risk nightmare.

And what if you made a mistake and deployed bad code? Or what if your new version has unforeseen issues? Simple: just redeploy the previous version of that same service. Everything works again. This is safe because you are only changing a small piece of the puzzle, not betting the farm. nearForm helps littleBits make this vision a reality, and as a result, littleBits now has the ability to move fast. And moving fast is what it is all about.

By: Richard Rodger

Richard Rodger is the co-founder and technology thought leader behind nearForm. A rare combination of successful entrepreneur and author, he is part of a small cohort that is changing the nature of enterprise software builds worldwide. Richard is the creator of Seneca.js, an open source microservices toolkit for Node.js, and, a search engine for Node.js modules. Richard's first book, 'Beginning Mobile Application Development in the Cloud' (Wiley, 2011), was one of the first major works on Node.js. His new book, 'The Tao of Microservices' (Manning), is due out in early 2017.