Containers fundamentally enable contemporary large-scale cloud computing platforms.* In placing an earlier summary of Cloud Foundry tools in a broader market context, this post explains how event-driven architectures depend on an important further evolution in container technology.
* Notable exceptions are large Hadoop or Spark clusters set-up on bare metal servers to quickly analyze and solve problems, or support machine learning iterations, related to very big data sets.
As predicted, accessing the internet through mobile devices now predominates. By the end of 2014, the gigantic anytime, anywhere market potential of the mobile Internet took decisive, business-disrupting shape with Uber, making ‘Ubering’ a synonym for any mobile-computing-based disruption of an established form of business. One could make a case that social web titan Facebook was protecting itself in 2013 when it paid 19 billion for the over-the-top messaging system WhatsApp. In any case, by 2015, the Mobile First application development paradigm had become commonplace.
With strategies for Ubering markets currently a regular focus in tech start-up pitch meetings from coast to coast, established businesses, threatened with being Ubered, must rapidly develop and implement their own strategies to engage and retain their customers.
These market-disrupting pressures are reflected in two complementary trends in enterprise application development:
Decomposing large on premises applications into smaller ones that better support rapidly evolving mobile applications while also still leveraging systems-of-record data in on premises systems.
Creating smaller teams focused on quickly putting business ideas into practice as new, cloud-native applications that, by being independently and continuously iterated, and by strategically accessing cloud platform services like IBM Watson, more effectively engage mobile customers.
The overall result is increasingly faster application innovation with an aim to reach users in an expanding range of real-time situations.
Another complementary trend–in IT architecture–is to design and deploy hybrid clouds that best allow for growth with an enterprise’s necessarily fast-evolving business strategy. In a survey of 500 IT decision makers worldwide, IBM Center for Applied Insights found that 7 in 10 said they would always have a blend of traditional IT and cloud.
Finally, cloud platform providers themselves, in this era of the mobile Internet, knowing that workflows as often as not cross clouds, and workloads strategically will be shifted from on premises to public or private cloud platforms depending on various considerations, offer flexibility in deployment types (multi-tenant public, single tenant public, local on premises), flexibility in computing technologies (the abstracted runtimes of Cloud Foundry, support for containerized apps or containerized code libraries which leaner apps can utilize, bare metal infrastructure for high performance computing jobs), and catalogs of cognitive and other data-enriching services.
The Edge of Anyware
We can already foresee that mobile users’ demand for information and value will continue to accelerate innovation in applications and platforms towards an edge where locative computing experiences meet the automated data flows of an Internet of Things—which itself, as a market, is forecast to be worth $7 trillion by 2020. On that edge sits an event-driven, serverless form of computing that can treat both user-initiated and sensor-generated data as events upon which to trigger specific automated actions, including interactions with cloud services.
Underlying event-driven computing is an evolution of container technology. Docker containers advanced cloud computing beyond its origins in virtual machines. While Docker-based, platforms like Cloud Foundry abstract containers from the application development process so that any developer, freed from thinking about containers or underlying infrastructure, can focus exclusively on writing code.
As an event-driven and real-time container orchestration system, IBM Cloud Functions,* for example, while also abstracting container creation and management, takes the further step of enabling developers to define events in the cloud to use as triggers for automatically executing small, independent pieces of code—called actions—that they write in a language of choice, leaving everything else to an engine that instantiates application code into appropriate containers as needed to execute the relevant OpenWhisk actions, often as an interrelated chain. Being event-driven and streamlined for scalable high performance, OpenWhisk actions keep up with the workflow needed to service either a user’s quickly-changing, location-specific experience–as mediated by a mobile application that remains thin on the client device by sending data into the cloud for processing–or an IoT data feed that results in some specific customer benefit.
In being spurred to define new triggers and actions that take advantage of business opportunities implied in new system events, developers can become creatively agile in a new way, potentially accelerating the rate of application iteration to keep pace with the demands of mobile user experience as implied by insights generated through clickstream analytics. In an event-driven programming platform, the response of an application iteration to usability friction can happen at a level of granularity to which other container-based cloud systems merely point the way.
Let’s consider a few specific IBM Cloud Functions application examples. All four, in executing Apache OpenWhisk actions, use a Cloudant database in IBM Cloud to store data and Watson services to process that data.
BluePic: enhanced photo-sharing through cloud services
In this first example, BluePic, an iOS photo-sharing application written end-to-end in Swift, directly communicates with OpenWhisk via a REST API. In real-time, BluePic sends a photo to the cloud for analysis–aspects of the image are recognized and tagged–and then lets you share the results with other BluePic users.
BluePic uploads the photo to a web framework server (Kitura), which writes information about it into a Cloudant database and sends the binary file into object storage. Following image upload, insert, and storage, the Kitura server makes a REST request into OpenWhisk to begin the asynchronous analysis.
Kitura invokes a main orchestrator action, which runs each individual action in its own container and in a chain:
Read information about the image from the Cloudant database
Request image tagging/recognition data from the Watson Visual Recognition service on IBM Cloud
Request weather data from the Weather Company Data service on IBM Cloud for the location where the image was captured
Receive the results from the Watson and Weather services, merge the data and save it back to Cloudant
Make a request back to the Kitura server, which delivers updated data back to the client device using the Push Notificaitons service on IBM Cloud.
After an action completes, the orchestrator recycles the relevant container. And through this real-time container orchestration, OpenWhisk essentially chains together microservices to execute the server-side business logic that BluePic initiates with a simple file transfer. For more on BluePic, watch the webinar.
Skylink: expedited insurance damage claims through cloud services
This next example pertains to the use case of documenting damage for commercial property insurance claims. Consider a scenario where an insurance company must hire an aerial photography vendor to capture images of the damage, which is both costly in itself and subject to the delays of scheduling. Enter SkyLink.
This mobile application receives images captured by a quadcopter drone, saves that data into a Cloudant database–running on the mobile device–that automatically replicates data with its mirror in the cloud, thereby triggering a chain of OpenWhisk actions similar to those in the BluePic scenario:
Read image data from the Cloudant database
Request image analysis/tagging from the Watson Visual Recognition service on IBM Cloud
Receive and write the results of the analysis to Cloudant.
The entire workflow occurs in real-time, while the drone is still in the air. The application reduces the cost and time of acquiring the images, reduces the time of verifying that all areas of damage have been fully captured, and so reduces time needed to complete the damage assessment. Watch the Skylink webinar to get the coding details.
Dark Vision: analyzing and tagging frames in video streams
Like BluePic and Sklyink, this mobile application uses the Watson Image Recognition service to analyze and tag objects in images. However, the important difference is that Dark Vision does so based on a video source, and by using a Docker image of the ffmeg multimedia framework in an OpenWhisk action to extract the video frames that Watson analyzes.
Dark Vision triggers a main orchestrator action when a user of Dark Vision uploads a video. The orchestrator, based on the triggers connecting the actions in sequence, manages the containers needed to execute these other actions:
Read information about the video from the Cloudant database
Request a Docker image of ffmeg to extract images from the video and save each image in the Cloudant databae
For each image, read information about each image from the Cloudant database
For each image, request image/face analysis and tagging from the Watson Visual Recognition service on IBM Cloud
Receive the results from the Watson service and save it back to Cloudant
Push the image/tag data back to Dark Vision on the client device.
Project OpenFridge: automated maintenance through an IoT feed
In this last example, Project OpenFridge, a Watson IoT service in IBM Cloud processes a feed of status messages from a home refrigerator, triggering these Cloud Functions actions as conditions apply:
Match a current value against service records and write into a Cloudant database if the defined threshold is exceeded
Look up the appliance registration information to determine warranty status; if active, order/ship the replacement part, emailing the customer; if inactive, create/email a pending order ready for payment and checkout
Watch the video (https://www.youtube.com/watch?v=8XZVC9OEF1U)