Author: Shi Mingwei (Shiru)
Foreword: The event bus EventBridge product and FC (Serverless function computing) product are fully integrated and deeply integrated, which means that there is a unified standard access method for function computing and Alibaba Cloud ecological products and business SaaS systems; relying on EventBridge unified standard event source access Combined with the efficient and agile development characteristics of serverless function computing, it can help customers to quickly build cloud business systems based on rich events and combined with the EDA architecture. In order to help you better understand, today's introduction is mainly divided into three parts: why one-stop in-depth integration is needed, FC and EventBridge product integration function demonstration and scenario introduction, EventBridge and function computing in-depth integration next stage planning.
Why do you need one-stop deep integration?
First let's take a look at what is EventBridge and what is function computing?
What is EventBridge?
Alibaba Cloud EventBridge (EventBridge) is a serverless event bus that supports the easy connection of user applications, third-party software as a service (SaaS) data, and Alibaba Cloud service data through events. Rich events from cloud products and SaaS services;
From the perspective of the entire architecture, EventBridge connects the event source and the event target through the event bus and event rules. First, let's quickly popularize several core concepts involved in the EventBridge architecture:
• Events : records of state changes;
• Event source : the source of the event, the generator of the event, the systems and services that generate the event, the event source produces the event and publishes it to the event bus;
• Event Bus: Responsible for receiving events from event sources; EventBridge supports two types of event buses:
• Dedicated event bus for cloud services : A built-in event bus that does not need to be created and cannot be modified. It is used to receive events from your Alibaba Cloud official event source.
• Custom event bus : standard storage state bus, used to receive events of custom application or stock message data, this bus is optional for general event drivers.
• Event rules : used to filter, convert events, and help better deliver events;
• Event target : the consumer of the event, responsible for the processing of the specific event.
Through the above process, the entire process of event generation, event delivery, and event processing is completed. Of course, events are not a new concept, nor is event-driven architecture. Events are everywhere in our system, and event-driven architecture is also constantly discussed along with the evolution of the entire computer architecture. For EventBridge, the cloud-native event standard CloudEvents is used to describe events; it brings standardization of events. Such standardization and the openness of event standards bring one of the most significant advantages: standardization of access, both for event sources and event targets.
What is functional computing (FC)?
Function Compute is an event-driven fully managed computing service. With Function Compute, you don't need to procure and manage infrastructure such as servers, you just write and upload code. Function Compute prepares computing resources for you, runs tasks flexibly and reliably, and provides functions such as log query, performance monitoring, and alarming.
From the above description, in summary, you only need to remember a few points:
• Simple and easy to use: Quick launch, greatly improving business R&D efficiency;
• Serverless O&M: Save O&M investment;
• Pay-as-you-go: stable response to sudden traffic scenarios;
• Event-driven: Cloud products communicate with each other quickly.
Why does Function Compute need EventBridge?
Function computing is the first choice for many customers to use event-driven architecture to build business systems because of its light weight, speed, and the ability to link with other cloud products in an event-driven manner. The connection requirements for computing and more cloud products and services are becoming more and more. At the same time, customers of other cloud products also hope to use the characteristics of serverless function computing to help process some system tasks and events.
1) Event Source Diversity Challenge
As the core competitiveness of function computing products, event-driven, connecting function computing and other cloud products, as well as user-defined applications, the connection of SaaS services has become an urgent need for functional computing ecological integration, but system integration and ecological construction have never been easy. matter. Before the function computing system is integrated with EventBridge, it has been integrated with cloud products in typical user scenarios such as OSS and SLS, and has also been integrated with about a dozen other products of Alibaba Cloud. Different systems have different event formats and different systems. The registration notification mechanism is also different, and the failure handling mechanism of different upstream systems is also different; some systems support synchronous invocation methods, and some systems support asynchronous invocation methods. The product and business scenarios faced at the time of function computing did not give much consideration to the extended support for new product capabilities and business scenarios at that time. With the integration with more cloud products, the investment in integration, the difficulty of integration and the difficulty of underlying data management become more and more difficult. Faced with the objective difficulties of integrating multiple event sources, Function Compute hopes to improve the integration efficiency with other cloud products.
2) Authorization complexity and security risks
In addition, function computing hopes to improve the user experience and ensure that users care about the processing of events; at the same time, it hopes to ensure the complexity of the system authorization level in the face of a large number of cloud products. When users use event triggers, they need to understand the permission requirements for different products to access Function Compute, which brings great difficulties for customers to use Function Compute. In order to speed up product access, a large number of users often use FullAcees permissions, resulting in larger products. Security risks.
3) General ability is difficult to precipitate
Faced with different upstream event sources, how to better deliver events and consume events better? How to handle event error? How to choose the calling method of Function Compute? As well as the feedback of the function computing backend error Backpressure capability, the retry strategy and upstream system parameter settings, and the limitation of the number of triggers, function computing event triggering has to face problems. In order to better serve customers and provide reliable consumption processing capabilities, Function Compute hopes to have a unified access layer, and build consumption capabilities and flow control capabilities based on the unified access layer. By precipitating at such a standard level, it provides reliable service quality while ensuring call flexibility.
Why does EventBridge also need Function Compute?
As a standard event center, EventBridge hopes to help customers make use of these events and link the capabilities of products through events. In order to achieve this purpose, it is necessary to help customers to quickly consume and process these events through a more convenient path. . The deep integration of EventBridge and Function Compute is for this common goal—to help customers quickly build business systems based on EDA architecture, and to promote business success.
FC and EventBridge product integration function demonstration and scene introduction
The event types specifically supported by EventBridge basically include all official products of Alibaba Cloud. You can view the currently supported event source types of Alibaba Cloud official products on the EventBridge official homepage.
EventBridge triggers and asynchronous integration
Click the link below to jump to view:
https://www.bilibili.com/video/BV1NY4y1e7fE/
Function Compute asynchronous link supports direct delivery of processing results to MQ and EventBridge, and users can use EventBridge to deliver relevant results to SAAS services;
Click the link below to jump to view:
https://www.bilibili.com/video/BV1FY411j7yz/
Changes in Bidirectional Integration
1) More event trigger options for users
a. Function Compute supports 85+ official event sources of Alibaba Cloud;
b. Function Compute supports event triggering of the entire Alibaba Cloud message queue, including RocketMQ, RabbitMQ, MNS, etc.;
2) More convenient event triggering experience for users
a. The EventBridge and the Function Compute console communicate with each other, and users do not need to jump back and forth between the Function Compute console and the Event Bus console;
b. Users can quickly jump through trigger details, and use EventBridge event tracking capabilities to help users quickly troubleshoot problems;
Summary of official event source operation and maintenance scenarios
Event-driven scenarios based on official event sources can be roughly summarized into four scenarios.
Scenario 1 : Operation and maintenance requirements of a cloud product under a single account. Usually customers want to do some automated diagnosis and operation and maintenance operations based on such an event, including events such as cloud server events, ECS, or container service image events.
Scenario 2 : Actually, it is an extension based on scenario 1. For the events of multiple cloud products, I hope to be able to further analyze and do some troubleshooting.
Scenario 3 : We have observed that when some large enterprises use cloud products, Alibaba Cloud products are actually used by multiple accounts. In the case of multiple accounts and multiple products, it is hoped that we can analyze the cloud resource usage in multiple accounts from a global and unified perspective, and make some adjustments to account quotas at the same time. In this case, the ability of EventBridge cross-account event delivery can be used, and then function calculation can be used to do a unified processing.
Scenario 4 : This scenario is actually an account cross-domain event processing scenario. EventBridge currently does not provide such a cross-domain capability. In this case, you can use the HTTP function capabilities provided by Function Compute to automatically generate HTTP Endpoints. EventBridge's HTTP event source, completes cross-domain consumption of events.
### Custom Event Source Scenario Summary
1) MNS queue custom event source trigger scenario: After the customer uploads a file in OSS, the ACK is expanded according to the file upload event. Currently, it is sent to MNS through OSS events, and then the MNSQueue message triggers function calculation through EventBridge. ECI resources are created according to a certain logic; at the same time, customers want to use MNS for notification services; using the EventBridge subscription model, through the definition of event rules, the notification service and function computing can share the same event subscription rules, which can greatly simplify the user's Program.
2) RabbitMQ queue custom event source triggering scenario: In view of RabbitMQ's performance in terms of stability and reliability, it is widely used in IOT scenarios, customers usually choose to use RabbitMQ for data collection and storage of end devices, considering IOT The relevant embedded device performance usage environment, usually the data collected by the terminal device is more biased towards the underlying raw data. At the actual business level, the customer needs to find a fast and efficient way to process the data in RabbitMQ, through the custom event provided by EventBridge. The bus uses function computing to quickly process the data in RabbitMQ to achieve the purpose of ETL.
Next-stage planning for deep integration of EventBridge and Function Compute
Event filtering advanced ETL processing
Integrate Function Compute and EventBridge more closely, and Function Compute provides some advanced ETL capabilities to improve the ability of the entire event filtering and transformation.
Provides richer event targets
At present, there are relatively few event targets in the entire downstream of EventBridge. We hope that through the close integration of function computing and EventBridge, we can use the agile development capabilities of function computing, and build some more through the large account model and the ability of users to support themselves. Rich EventBridge downstream event targets help enrich the entire event target ecosystem.
Summarize
Through the introduction of the one-stop in-depth integration analysis and integration scenarios of EventBridge and FC, this article aims to help you better understand how to use the one-stop integration solution of EventBridge and FC when faced with rich events, quickly based on events. Drive (EDA) framework to build business systems on the cloud.
If you want to learn more about application scenarios, you can pay attention to the "Alibaba Cloud EventBridge Series Open Courses". The complete course has been launched and is continuing to be broadcast! This series of live courses includes 5 topics in total, which will take you to understand the core functions and applications of Alibaba Cloud EventBridge event bus.
The specific arrangement of the series of courses is as follows, interested friends don't miss it~
Scan the QR code in the poster, join the DingTalk group, view the group playback, and watch past videos~
Click here to watch the public class video corresponding to this article~
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。