In early 2015 Amazon introduced its Lambda functions as a serverless execution environment. Although Amazon was not the first to think of event driven applications, they were the first to introduce a formal support in a product for this. Late in 2015 Google was quick to release alpha version of its Cloud Functions, promptly followed by IBM OpenWhisk beta in February 2016. Why all the fuss?
The benefits of this new paradigm are that you do not longer need to explicitly provision servers and worry about auto-scaling, high availability, updates, maintenance and pay for hours of processor time when your server is running, but not serving requests. Your code gets called whenever there is an HTTP call, database state change, or other type of event that triggers the execution of your code. You do not need to configure always-up JVM to be ready to accept that request. You get billed by request or per millisecond of execution time, not per hour of JVM regardless whether or not that heavy VM was doing useful work or not.
This programming model is perfect match for microservices, mobile, IoT and many other apps – you get inherent auto-scaling and load balancing out of the box without having to manually configure clusters, load balancers, http plugins, etc. If you happen to run on the cloud, you also get zero administration benefit. All you need to do is to provide the code you want to execute and give it to your cloud vendor. The rest is “magic”.
While there are many similarities between IBM, Amazon and Google event-driven offerings, there are some differences. Here are some unique features of the IBM OpenWhisk that you do not get from Amazon Lambda nor from Google Cloud Functions:
- Open Source runtime under Apache 2.0 license (IBM OpenWhisk on GitHub) allows you to see under the hood and contribute. Neither Amazon Lambda, nor Google Cloud Functions are Open Source;
- Integrated container support (run any binary in a Docker to execute the function). Amazon and Google do not support this capability;
- Easy access to cognitive Watson services. You could call Watson services from Amazon or Google, but outbound network fees would apply;
- You can build it yourself (see GitHub link above) and run it locally on your own hardware behind your own firewall and then move to the cloud if you so desire. You can’t run Amazon Lambda or Google Cloud Functions on your own server.
This last point is a big one. I imagine that not all of you reading this blog want to move 100% of your workload to the cloud. Can you do it on-prem? With OpenWhisk you can! Take IBM OpenWhisk for a test drive on Bluemix or build it yourself and let us know what you think!