May 6, 2016 | Written by: Abtin Assadi
Share this post:
In everyday cloud deployments, you define and deploy infrastructure, install software, and run code on servers. You then have to manage and maintain those servers.
In a serverless architecture, developers no longer have to worry about the underlying infrastructure. They can run code without maintaining servers.
OpenWhisk is one example of serverless architecture — a distributed, cloud-based, event-driven compute platform. It provides a programming model for uploading event handlers to a cloud service and registering these handlers to respond to events. With its event-driven model, the service automatically executes user code in response to an external event. Rules triggering application logic can be dynamically changed, creating an efficient and flexible environment.
A small snippet of application logic is stored on the OpenWhisk platform, which receives event notifications from Internet of Things (IoT) devices, external web services, mobile applications, or other Bluemix services.
This notification fires off a rule that acts as a trigger, activating the logic and responding to the event. The application runs for brief periods to fulfill the logic in response to a trigger. The application is only run when needed instead of running continuously, reducing costs. Cloud charges are based on runtime and the number of requests.
OpenWhisk scales automatically to fulfill the triggered demand, freeing the developer from worry about resource maintenance and availability. These small services are frequently stored in Docker containers, where they can be quickly activated and deactivated.
OpenWhisk enables developers to create microservice-based applications, in which individual tasks are developed, deployed and maintained separately. Individual parts of an application can be deployed in scale and maintained in parallel by separate teams. The microservices approach enhances application scalability and resiliency by allowing multiple instances of each task to run concurrently. Container technology, with its quick start and shut down, has made the new microservice model possible.
Event-driven, asynchronous services in conjunction with a microservices approach may prove an important competitive advantage for cloud services.
OpenWhisk is the first open source version of an event-driven serverless environment. Bluemix OpenWhisk provides support for three different languages: Node.js, Apple’s Swift, and Java, with more language support expected in the near future. Developers can package custom code in a Docker container if they need to import legacy code.
A cloud-based, event-driven, distributed compute platform makes a perfect processing and coordination engine to build your next cognitive application. Find out more about Bluemix OpenWhisk.
Learn more about microservices from Cloud Advisor Abtin Assadi.