Five minute intro to open source serverless development with OpenWhisk
At the O’Reilly Software Architecture Conference I gave a five minute summary of serverless development, introduced the Apache OpenWhisk open source project, and showed how to get started with OpenWhisk on IBM Bluemix. This post is a transcript of that talk.
Serverless developers focus more on code, less on infrastructure
Following increasing abstraction away from bare metal over the years, new serverless platforms like OpenWhisk and Amazon Lambda enable developers to focus more on their key business logic—written as ever smaller pieces of code, or functions — rather than its supporting infrastructure.
“Serverless” has emerged as the term for this deployment model because the developer point of view — and his or her concerns — have shifted away from operating the infrastructure that supports the code.
That, and because the code isn’t always running on a server at all. But more on that later.
Microservices can be hard to manage at scale
These new serverless platforms help developers build well-designed, cloud-native applications more easily by offloading many of the operational best practices recommended by the 12 Factors.
This is particularly true in the areas of application scaling, container lifecycle management, and workload concurrency — which can quickly get out of hand once they go all in on microservices.
Emerging workloads are a good fit for event-driven programming
But there are also many more types of applications that aren’t the common type of HTTP-based microservice that also can benefit from cloud platform elasticity. These include data processing, IoT, chatbots, and batch jobs.
These workloads are a good fit for the event-driven model that serverless platforms provide through support for different protocols (MQTT, for example) and asynchronous (non-request/response) interaction models.
Serverless cost models charge more accurately for usage
A new cost model is emerging along with serverless architectures. One that ties code execution time directly to the price developers pay for services.
This is where the second aspect of the term “serverless” comes into play, as code isn’t running and therefore consuming resources while idly waiting for requests. Simon Wardley provides a deeper look at the implications of this.
While serverless architectures aren’t a silver bullet, and there are dragons as Mike Roberts notes, they do provide a new developer tool and deployment option for many use cases.
OpenWhisk enables these serverless, event-driven workloads
So how can you actually start to develop and deploy serverless architectures today — and begin to take advantage of these new technical capabilities and cost models?
OpenWhisk is flexible, extensible, and integrates with a variety of internal and external event sources, which are its key differences from Amazon Lambda, Google Cloud Functions, and Microsoft Azure Functions.
Developers work with packages, triggers, actions, and rules
OpenWhisk offers the developer — that person with the serverless point of view I mentioned earlier — a straight forward programming model based on 4 concepts: packages, triggers, actions, and rules.
OpenWhisk is built on solid open source foundations
Behind the curtain there are servers to run your serverless applications, of course. The developer doesn’t care about them, but those interested in the inner workings of the platform will.
You can run the platform using Vagrant on a workstation or deploy it on premises with OpenStack, for example.
Bluemix offers management, tooling, and monitoring
Apache OpenWhisk is available to end users as a hosted service on IBM Bluemix (and possibly in the future, from Adobe and others as well).
Bluemix provides an online editor and workflow builder for OpenWhisk actions, triggers, rules, and packages…
…with debugging tools and execution cost details…
…as well as a visual monitoring console — over and above the Apache OpenWhisk open source platform.
Get started on Bluemix, or explore the open source project
If you’re interested in building your first serverless application, try OpenWhisk on IBM Bluemix. If you’re interested in the underlying open source project, or packaging your service for others to use, check out the Apache project.
Developers like myself are always willing to help, and you can meet other community members through our social media channels.
In addition to the video at the start of this post, you can find the complete presentation slide deck here:
Daniel Krook is a New York-based Software Architect, Distinguished IT Specialist, Master Inventor, and member of the IBM Academy of Technology. He works with customers and the community to create first-of-a-kind cloud solutions based on the OpenStack, Cloud Foundry, Docker, and OpenWhisk open source projects. Most recently, Daniel has been building bots and IoT solutions backed by serverless, event-driven cloud architectures.