mesosphere

The Internet of Pis with Hackers at Berkeley

Sep 24, 2015

Sunil Shah

D2iQ

2 min read

  
On Thursday 17th September, Mesosphere hosted our second workshop for undergraduate students at UC Berkeley through Hackers @ Berkeley. Hackers @ Berkeley is a student organisation that aims to teach its members practical Computer Science skills through workshops and hackathons.
 
Not only did Apache Mesos, the open source cluster manager that underpins Mesosphere's DCOS, begin life as a graduate student project at UC Berkeley, but Mesosphere is also host to several Cal alumni - including one of our founders, Benjamin Hindman. So we jumped at the opportunity to introduce undergraduates to what we believe is the future of deploying and orchestrating services.
 
Microservices are an abstract concept, particularly if you're used to building monolithic applications to solve homework problems or for class projects. One of the goals of the workshops was to show how microservices work in reality and how you can easily package and deploy your very own microservice using Docker and DCOS.
 
 
Students used a 15 node DCOS Community Edition cluster running on Amazon Web Services and deployed their applications using the DCOS CLI.
 
Our goal was to show how you can do something useful with microservices. We initially came up with a basic frontend/backend exercise that provided built-in service discovery using Mesos-DNS. It was kind of cool, but we wanted something that connected with the real world in a tangible way.
 
In August, we announced Mesosphere Infinity, a new product that makes it easy to launch a data ingestion system on a DCOS cluster. This inspired our workshop activity and we ended up using a subset of Mesosphere Infinity to create a simple Internet of Things pipeline.
 
In our pipeline, we used 7 Raspberry Pis equipped with USB microphones, wi-fi, and a simple Python script to capture the local noise level. These sensors posted their data in real time to a DCOS cluster running in the cloud, on Amazon Web Services.
 
We then built a simple Python REST API called Perimeter that wrote the ingested data to a Cassandra ring. Our workshop participants would, as their final exercise, deploy a Javascript visualiser to the DCOS cluster.
 
Several students made it all the way through to the end and had their very own visualizer running!
 
While we hope the students learned something useful, the evening wasn't without its lessons for us, also. It helped us come up with good, simple examples that show how to deploy services on DCOS clusters.
 
The source code for this pipeline is available on GitHub. Huge thanks to Tyler Neely and Greg Mann for their help making the workshop possible, and to Christian Bogeberg, Gabriel Hartmann, Gilbert Song, John Garcia, Jonathan Manalus and Kim Garshol for their support during the workshop.

Ready to get started?