Serverless computing explained

BIG DATA MATTERS blog

Serverless computing allows you to build and run applications and services without thinking about servers. Serverless applications don't require you to provision, scale, and manage any servers. You can build them for virtually any type of application or backend service, and everything required to run and scale your application with high availability is handled for you.

Building serverless applications means that your developers can focus on their core product instead of worrying about managing and operating servers or runtimes, either in the cloud or on-premises. This reduced overhead lets developers reclaim time and energy that can be spent on developing great products which scale and that are reliable.

Of course, in the background, servers still exist, humming away. But serverless architectures are stateless. They do their work by executing a bit of logic—a function—and calling out to other services to do whatever else they need. If you’re a developer who primarily builds applications using services via APIs or needs to respond to events, serverless architecture may prove to be the easiest, fastest, and least risky means for getting the job done.

Among the chief services available for serverless in the cloud are AWS Lambda, Azure Functions and Google Cloud Functions. 

How it works

Serverless Computing

 

Upload the function and link it to a request or event. From the moment a request has been made (a REST invocation, for example) or an event has occurred (e.g. a file is added to an S3 bucket), your function will be called with the passed-in arguments and your return parameters will be passed along as the results.

Your function can be written in any language supported by your provider. At the moment of writing AWS Lambda supports code written in Node.js (JavaScript), Python, Java (Java 8 compatible), and C# (.NET Core) and Go.

With Serverless, you pay for consumption and are charged only for the compute time you use. With AWS Lambda, you are charged for every 100ms your code executes and the number of times your code is triggered. You don't pay anything when your code isn't running.

Because all you see is a function, there's no place to store state. When a function is done executing, its compute resources can be garbage-collected and reused. Therefore, state must be stored in some other service like a database or a cache.

Cloud-based serverless providers

All the major cloud providers are developing their own product. Amazon has AWS Lambda, Microsoft has Azure Functions and Google has Google Cloud Functions. In terms of deciding among the three, if you are already on the public cloud, it’s best to use the product from your current provider. A big part of the usefulness of Serverless is the richness of the available services and events you can consume. Those choices are best inside your cloud. But if you’re getting started in the cloud and stability is important, then AWS Lambda has been around the longest and is the safest choice thus far.

Use cases

Real-time file processing

You can use Amazon S3 to trigger AWS Lambda to process data immediately after an upload. For example, you can use Lambda to thumbnail images, transcode videos, index files, process logs, validate content, and aggregate and filter data in real-time.

Real time file processing

Real-time Stream processing

You can use AWS Lambda and Amazon Kinesis to process real-time streaming data for application activity tracking, transaction order processing, click stream analysis, data cleansing, metrics generation, log filtering, indexing, social media analysis, and IoT device data telemetry and metering.

 Real-time stream processing

 

IOT Backends

You can build serverless backends using AWS Lambda to handle web, mobile, Internet of Things (IoT), and 3rd party API requests.

IOT Backends

Web applications

By combining AWS Lambda with other AWS services, developers can build powerful web applications that automatically scale up and down and run in a highly available configuration across multiple data centers – with zero administrative effort required for scalability, back-ups or multi-data center redundancy.

Web Applications

 

Need help with your AWS project?

Source: AWS & Infoworld

 

 

Posted by Matthias Vallaey on 13-aug-2018 14:00:08

Matthias Vallaey

About the Author

Matthias is founder of Big Industries and a Big Data Evangelist. He has a strong track record in the IT-Services and Software Industry, working across many verticals. He is highly skilled at developing account relationships by bringing innovative solutions that exceeds customer expectations. In his role as Entrepreneur he is building partnerships with Big Data Vendors and introduces their technology where they bring most value.