Menu
×
   ❮   
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY AWS CYBERSECURITY DATA SCIENCE
     ❯   

AWS Thinking Serverless


How to Think Serverless

To think serverless is to think asynchronous.

Thinking asynchronous is to write asynchronous code.

Asynchronous code does not need to wait for the execution of other code blocks.

Asynchronous code is code that runs at the same time as other code.


Asynchronous Connections

The serverless design relies on asynchronous communications, also called asynchronous connections.

Asynchronous connection reduces the number of application timeouts.

A timeout is a period of time when a user does not interact with the application.

Asynchronous connections lower the latency of HTTP responses.

Asynchronous connections make the user experience better.


Think Serverless Video

W3schools.com collaborates with Amazon Web Services to deliver digital training content to our students.


Simple Serverless Patterns

Simple Serverless Patterns are also called Event-Driven Patterns.

Event-driven code responds to an event, like a state change, and then the code is executed.

An event is a situation that can be triggered.

In an event-driven architecture, user experience and code execution are separated.

Separated entities communicate by asynchronous connections.



How Serverless Pattern Works

Information goes to the client through an Application User Interface (API) call.

The API call is an operation that your application can trigger and perform tasks.

The API call is served over the HTTP request.

Call responses and requests are handled by the Amazon API Gateway.

The logic that processes the call is inside a Lambda.

Storage for API call data is handled by Amazon DynamoDB.


Issues With Synchronous Approach

A synchronous approach in serverless architecture can present issues.

In synchronous code, operations can only happen one after another.

Scaling difficulties that happen are shown to the client.

When an error happens in Lambda, automatic call retries are not built-in.

It takes more time to develop and implement proper error handling in the front-end code.

You are responsible for implementing automatic call retries should API calls fail.

Asynchronous patterns should be used whenever possible.


AWS Serverless Exercises

Test Yourself With Exercises

Exercise:

What is another name for asynchronous communications?

Asynchronous 

Start the Exercise


×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
sales@w3schools.com

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
help@w3schools.com

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy policy.

Copyright 1999-2024 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.