The Gorilla Guide to Serverless on Kubernetes – Chapter 7: Serverless in the Real World

This is an excerpt from The Gorilla Guide to Serverless on Kubernetes, written by Joep Piscaer.

Previous chapters:

You can download the full Gorilla Guide here.

Serverless in the Real World

In this last part of the guide, we’ll show some practical examples of serverless. The first one is a common banking application using web and API technologies. It uses a database running on Kubernetes, CockroachDB, with various functions in Fission, the open source Kubernetes-native Serverless Framework interacting directly.

Each example is accompanied by a GitHub page that enables you to easily run the sample code on any Kubernetes environment with Fission.

Example 1: Banking Site

Each of the actions on the site, like depositing, withdrawing, and transferring money between accounts and balances are functions running on Fission, triggered by HTTP actions.

Fission lets you easily and quickly create the various functional areas of the site, such as creating an account and various banking activities as functions.

  1. When a user visits a web page, the browser hits the web server’s HTTP trigger to get the HTML files.
  2. Any operations on the web page send an AJAX HTTP request to backend RESTful API functions.
  3. Once a function receives requests, it interacts with the database, which launched in a different namespace, to get/insert/update records.
  4. After database operations complete, the function response user requests with HTTP code and the message body.

Check out this GitHub page to run this sample use case on any Fission environment.

Example 2: Carpool

The carpool application is a great example of combining multiple functions into a single workflow, parallelizing certain functions to optimize the flow.

The application tries to match a car owner offering seats in their car with riders looking for one or more seats in a shared carpool.

Check out this GitHub page to run this sample use case on any Fission environment.

Example 3: Internet of Things

This use case shows how a serverless app consumes sensor data from IoT vehicles to figure out the most optimal route.

Check out this GitHub page to run this sample use case on any Fission environment.

The Unstoppable Force

Serverless is an unstoppable force that’s changing the way developers release code into production. It allows them to focus on what’s important: developing business logic. It abstracts everything the developer shouldn’t have to worry about, increasing their velocity, simplifying the pipeline, and shortening the feedback loops.

Organizations adopting serverless are able to adopt to changing requirements more quickly and make it easier to do more and smaller experiments, to quickly discover what works and what doesn’t. This leads to better quality code, delivered faster.

The unified serverless experience of Fission allows functions to run locally, on the developer’s laptop, in the data center, or in the cloud by leveraging the power of the Kubernetes platform.

The ability to run functions in spare compute capacity in the on-premises data center has more than just cost benefits. It also minimizes network latency and associated network bandwidth costs.

Fission, as an open alternative to cloud-specific FaaS services, has broad language support, but is fully customizable and flexible to run any code you need. It doesn’t lock you into one single cloud ecosystem, but gives you the freedom to choose. If you’re considering moving to serverless, you owe it to yourself to give Fission a whirl.

Learn more and install Fission

To learn more about Serverless, download the Gorilla Guide: Serverless on Kubernetes.

You may also enjoy

Siliconindia recognizes Platform9 as the most promising technology company

By Platform9

Cloud-native is no longer a luxury. It is a requirement.

By Ron Haberman

The browser you are using is outdated. For the best experience please download or update your browser to one of the following:

GigaOM’s Radar report for Managed KubernetesRead Now