The Gorilla Guide to Serverless on Kubernetes, Chapter 7: Serverless in the Real World
Take a look at these real-world examples of how to apply serverless functions in the real world.
Join the DZone community and get the full member experience.
Join For FreeServerless 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.
Check out this GitHub page to run this sample use case on any Fission environment.- When a user visits a web page, the browser hits the web server's HTTP trigger to get the HTML files.
- Any operations on the web page send an AJAX HTTP request to backend RESTful API functions.
- Once a function receives requests, it interacts with the database, which launched in a different namespace, to get/insert/update records.
- After database operations complete, the function response user requests with HTTP code and the message body.
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.

Example 3: Internet of Things
Check out this GitHub page to run this sample use case on any Fission environment.This use case shows how a serverless app consumes sensor data from IoT vehicles to figure out the most optimal route.
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 adapt 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.
Learn more and install FissionPublished at DZone with permission of Vamsi Chemitiganti, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments