AWS serverless and Websockets
What is AWS?
Amazon web service (AWS) is an online platform that provides scalable and cost-effective cloud computing solutions like servers, databases, software to its users.
Services of AWS:-
- Storage, Backup, and data management
- Mobile, Web, gaming and Social Applications
- Artificial intelligence (AI)
- Security
- Networking
- Compute
- Development tools
- Management and monitoring
- Messages and notification
What is Websocket?
A WebSocket API in an API Gateway which is a collection of WebSocket routes that are integrated with backend HTTP endpoints, Lambda functions, or other AWS services. API Gateway WebSocket APIs are bidirectional i.e. a client can send messages to a server, and the server can independently send messages to clients. Websocket API Gateway is widely used for building real-time web applications like chat applications etc.
Concepts of Websockets API in API Gateway
Route:- A route describes how API Gateway should handle a particular type of client request and includes a route key parameter, a value that we provide to identify the route.
Here are some special routeKey values:-
$connect – The route responsible for connection initialization
$disconnect – The route called when the client or the server disconnects from API
$default – It is called if there is no handler to use for the event
custom routes – It is called if the route name is specified for a handler
Difference between Rest API and Websocket API?
Conclusion
AWS is a powerful technology that is the future. It provides the best practices across the five pillars for designing and operating reliable, secure, efficient, and cost-effective systems in the cloud. Using the Framework in the architecture will help us to produce stable and efficient systems, which allow us to focus on your functional requirements.