animind - Fotolia

Tip

Discover practical serverless architecture use cases

While architects and developers were slow to find practical use cases for serverless, numerous enterprise trends should drive the need for this architecture style.

What sorts of workloads make sense for a serverless architecture? Theoretically, any application should work in a serverless model. But, for the sake of efficiency and affordability, designers must determine which use cases actually make the most of what serverless offers.

The following serverless architecture examples -- both established and emerging -- should appeal to enterprise architects and developers.

Basic event-based applications

AWS pioneered the serverless architecture with Lambda in 2014, targeting event-based computing workloads. Lambda can call upon small code functions and run them when an event in a different area occurs. For example, the event could require an update to an Amazon DynamoDB database. The event call spins up an extremely low-latency instance of the code stub, which then carries out the required action. Then, Lambda spins it back down to optimize resource usage. This is the serverless architecture use case with which most developers are familiar.

When Lambda debuted, the opportunities to use this approach were limited. Many programmers preferred to build the entire code base on the IaaS AWS platform rather than split the code across two different environments. However, AWS decided to provide a free usage option for Lambda, which prompted some coders to experiment with it. This initial adoption phase set the foundation for serverless use, and competitive serverless offerings emerged: Google Cloud Functions, Microsoft Azure Functions, the open source Fn Project and IBM Cloud Functions based on Apache OpenWhisk.

Application designers can use microservices and serverless architectures to run workloads that would have been prohibitively expensive or otherwise unsuited to monolithic design on reserved resources. However, serverless isn't a wholesale replacement for other modes of operation. The best serverless projects are event-based workloads and not ones that run on a relatively constant basis.

Serverless data transfer

One use case for serverless is to create an architecture that bypasses the need for a content management system and content delivery network. Instead, events get triggered that take an Amazon Simple Storage Service or binary large object item directly from the database management system in the back end of the application and present it to a user.

At its conception, serverless computing looked like a technology with no real problem to solve.

Another new possibility is to use a serverless architecture for an extract, transform and load system, where the serverless side uses elastic resources as needed to carry out the ETL events and minimize costs.

Serverless within an AI-based workflow

A more complete serverless architecture-based system comes into play with the workloads related to video and picture analysis. In this example, serverless computing enables an as-needed workflow to spin up out of a continuous process, and the event-based trigger pulls in an AI service: Images are captured and analyzed on a standard IaaS environment, with events triggering the use of Amazon Rekognition or a similar service to carry out facial recognition when needed. The New York Times used such an approach to create its facial recognition system that used public cameras around New York's Bryant Park.

Software teams can also use serverless designs to aid technical security enforcement. Event logs from any device on a user's platform can create triggers that send a command into a serverless environment. The setup kicks off code to identify the root cause for the logged event or a machine learning- or AI-based analysis of the situation on the device. This information, in turn, can trigger what steps to take to rectify issues and protect the overall systems.

Serverless to support IoT

A particularly fascinating serverless architecture use case on the horizon rests within the burgeoning use of IoT. As the number of devices attached across a network grows and each device creates data, software teams need a means to deal with that data. This must be based on event-driven activities.

The vast majority of IoT devices are built without the internal intelligence to deal with a range of complex errors. Therefore, a serverless architecture that provides a way to aggregate data from a range of devices, analyze that data and then trigger desired events offers a low-cost but highly functional method to manage IoT.

At its conception, serverless computing looked like a technology with no real problem to solve. However, it's quickly starting to offer a few valuable use cases. It should also prove beneficial to put small code stubs, in the form of microservices, on a serverless platform. This combination helps the architecture respond to events and also create new events that support the demands of increasingly complex IT environments.

Next Steps

Compare AWS Lambda vs. Azure Functions vs. Google Cloud Functions

Dig Deeper on Application management tools and practices

Software Quality
Cloud Computing
TheServerSide.com
Close