Javascript on Devices #1 – 17/12/13

On Tuesday was the first meetup of a new meetup group: It’s all about running javascript on devices (e.g. the raspberry pi). In the past this would have been quite an usual meetup. Traditionally, embedded devices have always relied on native code to squeeze the most out of the computing power available on the device. However, javascript definitely seems to be the cool kid on the block and its community has leaps and bounds of energy for innovation.

For a native developer with (a little more than a) passing interest in web development this kind of meetup is a big culture shock. The technologies and tools bear a passing resemblance to what I’m used to in my traditional (mainly desktop-)client-server world, but everything feels a little foreign. Maybe because of that it also feels fresher and more exciting – like they are really pushing the envelope. Definitely lots of new stuff to research and think about (for me)!

For guys who do a lot of work with javascript or are familiar with embedded devices, these introductory talks may have been a little basic, but for me they were perfect. There were two talks:

  • A talk about the internet of things by Vlad
  • A talk about pushing javascript on to embedded devices with a simple git-push by Alex

The internet of things

Vlad’s presentation was split into two parts. He first talked about how with devices we currently have more of an intranet of things and the potential of moving towards the internet of things. He then spoke a little about the setup of his startup and how its work helps in moving towards the internet of things.

The intranet of things was Vlad’s metaphor for describing the current state of proprietary networks, protocol, standards and APIs that are prevalent in the embedded devices community. He argued that a move towards a REST & HTTP-based internet of things would bring big benefits to embedded devices:

  • ability to transfer experience of web development
  • proven scalability
  • reduction in development cost (ease of use, ability to reuse code for similar problems)

Another benefit is of course the ability to enable different devices to communicate and interoperate with each other. In my mind, this is the key benefit because pooling enables the kind of collaboration where the sum is greater than the parts: It is the kind of thing that turns a nicer development environment into a true platform on which higher level applications can be built:

For example, one of the things that Vlad mentioned is that we won’t need to physically search for our shoes in the morning and instead we will Google them. However, what if we could rely on a preference-based algorithm to physically select our entire wardrobe in the morning (entailing collaboration between lots of different individual units of clothing)?

He also talked a little about what may be necessary for this move towards HTTP (ADIs etc.)

The second part of his talk was more focussed on his startup‘s work towards this. This work has been to write REST APIs for particular projects as well as providing an infrastructure around these APIs. Interactions with the devices are supported at various levels of sophistication (QR code; RFID tag; sensors or raspberry-pi-like machines).

One of the interesting points was that his main customers are big companies who are looking to protect their (and their client’s data). Therefore, the normal deployment option is as a private cloud. Unfortunately, data security, identity and sharing are of course key concerns, when establishing a platform as described above. Private cloud-like deployment may limit potential.

In my mind, the main benefit is therefore the reduction of development cost and enabling a wider community to offer services for companies within their private cloud.

Deploying (javascript) more easily on to embedded devices

Alex’s talk had three parts to it:

  • Rise of javascript as a language and rise of devices

    This part talked about all the bits that you might expect from a young development community brimming with self-confidence: Describing milestones in the development of the language as Alex sees it (from original invention to use in gmail, to “javascript the good parts” to node.js to phonegap to nodecopter), showing us benchmarks in javascript execution times through time etc.

    Alex also described the evolution of devices, how devices are getting much more powerful and how we are reaching the point where squeezing performance for every clock cycle is no longer as important.

  • Using javascript for displays on bins

    The second part of the talk then described how Alex and his team first got involved in embedded javascript development. This was with a project for displaying ads on bins. The team here worked mainly on displaying ad content to end users. As part of this, they had to solve several interesting problems such securely interacting with the machines, finding a way of remotely updating content as well as underlying software, dealing with network reliability issues etc.

  • Use the experience gained for startup

    In the final part of his presentation, Alex described how this experience led them to develop an infrastructure that makes it easy to deploy javascript to devices. The service was compared in type to heroku (which I hadn’t heard of before) which offer a similar service for web applications. (I.e. they offer the ability to deploy to a hosted environment with a simple git push). Alex also described the technology stack they put together for interfacing with devices.Unfortunately, I can remember only some small parts of the infrastructure – in particular: docker and openVPN.

Altogether I found Alex’s talk very interesting and informative – with lots of pointers in new directions where I’d like to learn more!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s