-
Notifications
You must be signed in to change notification settings - Fork 26
Home
This wiki contains the getting started content posted to both Bluemix and the Accelerate developer advocacy site.
Respond to messages and handle streams Create auto-scaling actions that execute logic in response to messages or streams.
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 events, such as messages or new streams of data.
This project shows the power of serverless, event-driven architectures to execute code in response to messages or to handle streams of data records.
It demonstrates two OpenWhisk actions (written in JavaScript) that read and write messages with Message Hub (based on Apache Kafka). The use case demonstrates how actions can work with data services and execute logic in response to message events.
One action receives message streams of one or more data records, and these are in turn piped to another action in an OpenWhisk sequence (a way to link actions declaratively in a chain). The second action aggregates the message and posts a transformed message to another topic.
- The developer simulates a client publishing application and puts a new array of JSON objects onto a topic.
- The message in turn fires an event called a trigger tied to that topic.
- This trigger is mapped to the first action by a rule, which downloads and parses the message array.
- The message array is then sent to another action in a sequence to aggregate, or reduce, the data to a single message.
- The second action posts the new message to another Message Hub queue for another application to process.
- OpenWhisk
- Message Hub
- OpenWhisk
- Message Hub
-
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.
Analyze streaming Message Hub records with OpenWhisk
In many of today's cloud-native applications, data is generated at huge volumes and is used to link highly distributed services. Apache Kafka provides a system to stream messages at scale, but the systems that receive those messages must be able to process and act on individual records as well.
With an event-driven architecture built on OpenWhisk, you can write functions that respond to messages from queues and execute logic to process or send data to other systems in a distributed architecture. And you'll pay only for the resources consumed by your analytics functions for the fractions of a second that they run. This gives you a tight match between transactions processed and cloud resources used.
This is the promise of an event-driven, serverless architecture for new cloud-native applications such as those that support high volume stream-based message processing. Check out the new OpenWhisk demo on responding to Message Hub records and start processing messages at scale, not worrying about whether you'll have enough servers manage the volume.