What is OpenWhisk?

Donated to the Apache foundation, OpenWhisk is a robust FaaS platform originally developed by IBM and Adobe. Built atop Docker container technologies, OpenWhisk can be deployed in the cloud or on on-premises hardware. It is a platform that frees developers from worrying about managing the life cycle of their code or operations of the container runtimes that execute the code. OpenWhisk is designed to be scalable and to support massive numbers of function invocations. Currently, OpenWhisk is the engine behind IBM Cloud Functions.

The OpenWhisk scaling mechanism is not built on top of Docker Swarm or Kubernetes schedulers. It plugs directly into each Docker instance to start and scale function containers. With this design, OpenWhisk fits better with the plain Docker infrastructure than Kubernetes.

For developers, OpenWhisk provides a number of compelling features via its high-level programming model surrounding functions. Its event triggering mechanism is shown in Figure 6.1:

Figure 6.1: OpenWhisk's flow of event triggering

Similar to other platforms, OpenWhisk's smallest deployment unit is a function. In OpenWhisk, a function is referred to as an action. An action can be executed in response to an event. An event, in the form of a trigger, will be processed through a rule, where it selects an appropriate action to execute. After the action is executed, its result will be stored in the result storage before being emitted back to the source of the event.

OpenWhisk natively supports many language runtimes out of the box. However, this chapter focuses only on its Docker runtime, which allows developers to pack any kind of workload into a container and let OpenWhisk do the rest. An action in OpenWhisk can be invoked synchronously, asynchronously, or even on a schedule. Besides an action, OpenWhisk provides a declarative programming construct, such as a sequence to allow multiple actions to be chained and executed as a flow.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset