官术网_书友最值得收藏!

Serverless and event-driven collision

Event-driven computation is an architecture pattern that emphasizes action in response to or based on the receptions of events. This pattern promotes loosely coupled services and ensures that a function executes only when it is triggered. It also encourages developers to think about the type of events and responses a function needs in order to handle these events before programming the functions: 

Event-driven architecture example

A system built with event-driven architecture consists of Event Producers that produce a stream of events that are ingested using Event Ingestion, and then Event Consumers that listen for the events, as shown in the preceding diagram.

Events are delivered to consumers in near real time so that they can respond immediately to the events as they happen. Event producers are decoupled from the event consumers. As they are decoupled, the producers don't know which consumers are listening to the events that they produce. Event consumers are also decoupled from one another, and every event consumer sees every events produced by the event producers.

Serverless applications are usually built by combining multiple functions (FaaS) using offerings, such as AWS Lamdba or Microsoft Azure Functions, together with external backend resources, such as Amazon S3, Amazon DynamoDB, and many more solutions to manage the state between invocations. The architecture that ties these multiple functions (FaaS) is event-driven architecture. By combining tools, such as AWS Lambda and Amazon S3, you can develop applications without having to think about the provision and management of the infrastructure. As this is a shift in architecture compared to how you might have operated so far, you would also need to change how data will flow through your application, which is made up of functions.

In this event-driven architecture, the functions are event consumers because they are expected to come alive when an event occurs and are responsible for processing it. Some examples of events that trigger serverless functions include the following:

  • API requests
  • Scheduled events
  • Events in object storage
  • Events in databases
  • Notification events
主站蜘蛛池模板: 长宁区| 宁海县| 广南县| 龙口市| 肥西县| 兴城市| 汪清县| 天祝| 丰宁| 塔城市| 自治县| 安庆市| 格尔木市| 舟曲县| 赫章县| 惠州市| 安丘市| 那曲县| 上饶市| 黔西县| 绩溪县| 长阳| 政和县| 新密市| 曲水县| 廉江市| 宜宾县| 金沙县| 巫溪县| 浦城县| 肃北| 汉阴县| 肇源县| 阳山县| 新巴尔虎右旗| 宁都县| 阿坝县| 缙云县| 定日县| 巴林右旗| 元朗区|