You are on page 1of 2

https://www.javaworld.

com/article/3210726/application-development/serverless-computing-
with-aws-lambda.html
https://www.javaworld.com/article/3248595/application-development/serverless-computing-
with-aws-lambda-part-2.html?page=2

How traditional server based computing works?


server based computing follows 3-tier architecture – db layer, application layer and
presentation layer. DB layer is where ur database resides, application layer is where your code
resides, presentation layer is where the UI is provided to the end user.

You have to create and setup your server. Install OS and necessary softwares. Manage the server,
OS, take care of software and hardware upgrade. Take care that your application is highly available
and fault tolerant. Need to have load balancers in your applcation.

Serverless Computing : All the steps apart from writing code are no longer needed in serverless
computing. It allows you to focus on business logic with our having to worry about servers. There
are no OS, software to be installed. No software hardware updagrade. Yoru app are built in high
availability and fault tolerance.

Benefits of SL Computing
• No OS/ Servers
• Easy and efficient scaling. SL can be easily scaled automatically or can be choosed with a
few click the desired capacity.
• High availability.
• No idle capacity. Pay only for what you use and no more. If you have server with 100 GB
memory and u are using only 10 GB , you have to pay for 100 GB which is not the case fo
SL
• Pay only for the time your code runs.

SL Architecture
As part of SL arch, Amazon provides set of webservices that you can use to build and run serverless
application. There are 3 prominently used services that you can use in every serverless application :
AWS lambda, Amazon API Gateway, Amazon Dynamo DB. Other services include : Amazon S3,
SNS, SQS, Kinesis, Athena and so on.
When it comes to SL application, AWS lambda is the maost imp service used. It helps you to create
your code with out creating or managing servers. Upload your code in lambda, and lambda will run
the code for you. Each piece of code you upload in lambda is called lambda function. And it run as
self contained independent microservices.
API Gateway helps you to create and publich API’s. It helps you to create completely serverless
Restful API’s. RestFul API’s are APIs that follow client server model where client is stateful and
server is stateless. These apis can then be consumed by mobile or web app allowing you to interact
with AWS services through your code running on aws lambda. It can manage 1000 of concurrent
api calls.
DynamoDB is nosql serverless database. It can scale on demand to support unlimited concurrent
read write operations with response time in single digit milliseconds. Then we have DAX (Dynamo
DB Accelerator which brings down milliseconds latency to nanoseconds through caching service.

Interprocess messaging : In serverless computing, since there are no servers, you need a reliable
way for diff services or softwares to talk to eachother. AWS provides two services for this :-
SNS (Simple notification service) – Publish subscribe model.
SQS (Simple Queue service)
SL Usecases
Web/ mobile/ IOT applications & backends, real time data processing system.
User requests are received by API gateway, which will call any lambda function which interacts
with dynamo db or s3 and return result in the same path.

In Detail
SLC allows you to build your code and deploy it without need to configure or manage servers.
AWSlambda’s price tier is based on number of executions. First million executions per month are
free. $.20 per million execution there after.
Steps are :
• client makes a call to serverless computing platform to execute a function
• platform checks if function is already running on any of the servers. If not it loads function
from datastore.
• Deploy it on server
• execute the function
• returns result back to client

SLC is called as Function as a Service (FAAS) because granularity of the code u develop is
function.

SLC is a nanoservice architecture. Each nanoservice implement a single action or responsibility.

AWS Lambda
It helps you run code without provisioning or managing servers. You pay for the compute time you
consume, and there is no charge when your code is not running. Just upload the code and lambda
will take care of running and scaling your code. You can set up your code to automatically trigger
from other AWS services or directly from mobile or web app.

Account id – 901252375621
Access Key -
Access key ID Secret access key
AKIAI2Y2U3FD54J2CACQ ilKlqFY6M84bkxXFFrP/UJIrfXwrukt+6Shi6sUl

You might also like