-
Notifications
You must be signed in to change notification settings - Fork 19
Home
This wiki contains the getting started content posted to both Bluemix and the Accelerate developer advocacy site.
Respond to database changes Create auto-scaling actions that execute logic when text or images are inserted into a Cloudant database.
Serverless platforms like Apache OpenWhisk provide a runtime that scales automatically in response to demand, resulting in a better match between the cost of cloud resources consumed and business value gained. One of the key use cases for OpenWhisk is to execute logic in response to records inserted or updated in a database.
This project shows the power of serverless, event-driven architectures to execute code in response to database changes.
It shows two OpenWhisk actions (written in JavaScript) that write and read text and image data to Cloudant, a hosted Apache CouchDB service. The use case demonstrates how actions can work with data services and execute logic in response to database changes.
One action connects to Cloudant and inserts text and binary data as an attachment. It is defined with package variables that provide it with Cloudant credentials as environment variables. It is uploaded to the OpenWhisk platform, where it can be invoked manually to test.
A second action is created to respond to changes inserted into Cloudant by the first action. Instead of being manually invoked by the developer, a trigger and mapping rule are defined that bind it to the Cloudant database and listen for changes.
- The developer uploads and invokes the first action manually, this connects to Cloudant and inserts data.
- The data inserted by the first action in turn fires an event called a trigger. This trigger is mapped to a second action by a rule.
- The second action executes in response to the event, inspects the data, and logs information to the console.
- OpenWhisk
- Cloudant
- OpenWhisk
- Cloudant
-
What makes serverless architectures so attractive? - Serverless architectures are one of the hottest trends in cloud computing this year, and for good reason. There are several technical capabilities and business factors coming together to make this approach very compelling from both an application development and deployment cost perspective.
-
Build a cloud native app with Apache OpenWhisk - At this live coding event, Daniel Krook provides an overview of serverless architectures, introduces the OpenWhisk programming model, and then deploys an OpenWhisk application on IBM Bluemix, while you watch, step-by-step.
Data Processing with Cloudant – Responding to database changes in an event-driven architecture
Computing has fundamentally changed as the Internet shifts away from human driven, request/response web applications. New cloud-native microservices are more and more likely to respond to machine or system initiated events than they are to human driven HTTP requests. This trends will continue as "things" outnumber humans on the Internet.
New computing models are emerging to address this trend, one of the most interesting is called "serverless."