Scaling Industrial Event-Driven Microservices with OpenWhisk

by Alex KhizhniakJuly 11, 2016
The Industrial Internet of Things provides opportunities for vast event-driven deployments within enterprise IT. However, scaling out may be an issue.

Dealing with IoT traffic

Andrei Yurkevich, CTO, Altoros

Andrei Yurkevich

The Industrial IoT is real and it’s here. However, according to Andrei Yurkevich, CTO at Altoros, scaling out event-driven industrial IoT deployments may be an issue—both technically and financially.

He discussed this emerging world during a recent meetup in Silicon Valley, outlining the challenges that IoT and cloud-native apps bring in. He also described the requirements for a platform to develop scalable event-driven microservices and presented a demo app that connected mobile phones of several meetup attendees.

Andrei started with outlining the problems that may occur even when a company goes the microservices way. With IoT deployments, there are devices that send signals as well as devices that receive them. The amount and variety of devices can be enormous.

openwhisk-on-ibm-for-the-industrial-internet-v1

Andrei stressed that event-driven models are not limited to single, simple events. Rather, think of “multiple actions associated with one trigger,” in Andrei’s words.

Even with an intelligent use of containers, in which more than one process is put into a single container, there is a continuous need for invocation and termination of container (and therefore, server) instances. The need for instances can quickly escalate.

openwhisk-on-ibm-bluemix-scaling-out-v1

However, when the load goes down, what happens?

openwhisk-on-ibm-bluemix-an-excesive-compute-v1

The company still needs to pay for excesive computation resources and terminate them as quickly as possible.

 

The requirements for an event-driven platform

So, how can operators be sure they always have enough compute available for IoT processes, without busting their budgets by vastly over-provisioning? Using a platform to create event-driven apps and services may be a solution. With this in mind, Andrei provided a list of requirements that need to be present in a tool like that:

Andrei Microservices Requirements

According to Andrei, OpenWhisk is a platform that meets most of the above-mentioned requierments. It is one of the ways for developers to get a handle on how to design, deploy, and manage what should be an increasing number of event-driven apps and services.

In the traditional model, apps (and services) are deemed to be “on” continuously once they’ve been launched. In contrast, an IoT sensor is likely to be sending out a very short, periodic signal. With millisecond billing in place by the cloud provider, OpenWhisk is only using the time needed for that periodic signal. Thus, a microservice is charged only for the time it’s in actual use, which might be 50 to 100 milliseconds per minute.

Andrei outlined potential concerns enterprises might have about using OpenWhisk, such as vendor lock-in, but then pointed out the use of IBM Bluemix is not a strict requirement. OpenWhisk is an open-source platform, and there is a GitHub repository addressing these issues. As with Cloud Foundry, it is open, with individuals and companies encouraged to participate, explore, and move the needle.

(For more on using OpenWhisk outside IBM Bluemix in a local environment, read our tutorial at DeveloperWorks.)

 

Kubernetes Deep Dive DC

The sound of one phone clapping

To show the platform in action, Andrei gave an amusing but instructive demo of a “Clap-o-Meter” app. It was built with OpenWhisk and induced a clicking noise from connected mobile phones in the room. He started with the sound of his phone “clapping.” Then, with several people downloading the app on-site and initiating the app (i.e., creating an event to invoke it), simulated applause rippled throughout the room. Bravo!

Andrei also stressed the relative simplicity of building event-driven apps and services through the use of Node-RED. He then provided an abstracted diagram of how his magic Clap-o-Meter worked:

Andrei Microservices How did it work

Here’s the Clap-o-Meter app itself. The demo starts at 12’05” in the video below, followed by some technical Q&A.

 

Want details? Watch the video!

 

Related slides

 

Related links


About the speaker

Andrei Yurkevich, CTO, Altoros bio
With 10+ years in the software development industry, Andrei Yurkevich serves as President and Chief Technology Officer at Altoros. Under his supervision, the engineering team has grown from zero to 300+ specialists across seven global locations. Currently, he is responsible for technology alliances in big data and PaaS. Andrei has successfully implemented strategies for software product development, marketing, motivation systems, personnel performance management, and team building.

The post is written by Roger Strukhoff and Alex Khizhnyak.
Explore the pros and cons of microservices compares to monoliths. Learn how a PaaS can help to overcome your challenges
  •  
  •  
  •