Author: Shi Mingwei (Shiru) Ali Cloud senior technical expert

With the popularization and implementation of cloud native technology, enterprises often need to rely on multiple cloud products and services when building business systems, and the demand for product interconnection and system collaboration is becoming stronger and stronger. Event-driven architecture applies events to the triggering and interaction between decoupled services, which can help users to realize the interconnection and interaction between products and systems. Function computing, as the best choice for event-driven architecture, needs to provide users with rich event source triggering capabilities.

For function calculation, event source access requires a clear understanding of many details and authentication requirements of each upstream event source. Meanwhile, event processing and system error tracing become more and more difficult, and integration efficiency becomes the biggest obstacle to product capability. In order to accelerate the efficiency of event source integration, function calculation needs to find a unified standard event source access mode, build basic capability and observability based on common access layer, and provide customers with rich event source trigger choices.

Under such background and requirements, Ali Cloud Function Compute and Ali Cloud EventBridge product complete comprehensive and deep integration. This means that function computing and all products and business SaaS systems of Ali Cloud ecosystem have a unified and standard access mode, it means that function computing will have the triggering ability to access all event sources of EventBridge, and Serverless function computing will achieve the “last mile” of all products and services of Ali Cloud. Provide significant architecture extension capabilities for aliyun ecosystem based products.

Why EventBridge?

EventBridge is a serverless event bus that can easily connect users’ applications, third-party software-as-a-service (SaaS) data and Alicloud service data in the form of events, gathering rich events from cloud products and SaaS services. EventBridge has the ability to standardize events and access:

  • Event standardization: EventBridge follows the industry standard CloudEvent event specification, bringing together various events from ali Cloud ecosystem and EventBridge partners’ rich event sources. It also provides a sound event delivery mechanism and consumption strategy, and follows a unified event format for the whole system event flow.

  • Access standardization: Function computing options and EventBridge integration. Whether it is ali Cloud’s official event sources with a wide variety of products and services, or third-party SaaS systems, EventBridge provides a unified interface for function computing and other system integration. Function computing does not need to pay attention to the implementation details of upstream event sources. Just focus on event processing, leaving the integration and delivery of events to EventBridge;

The combination of EventBridge + Function Compute makes it easy to build event-driven applications because it takes care of event ingesting and delivery, security, authorization, and error handling for you. Allows you to build loosely coupled and distributed event-driven architectures that help improve developer agility and application resilience. Functional computing system provides a complete function creation, publishing and running system. Flexible construction capabilities combined with extreme runtime flexibility will help businesses build event-driven architectures with the most significant features in the cloud native era.

At the same time, EventBridge can provide real-time data streams from event sources (such as MQ, OSS, RDB, etc.) and route this data to Ali Cloud function computing as a target. You can set routing rules to determine where the data is sent to build an application architecture that responds to all data sources in real time.

Function to calculate + EventBridge changes?

Provides access to 90+ event sources

Before the integration with EventBridge, function computing has been integrated with some core systems of Ali Cloud. With the deep integration of EventBridge, a large number of services of Ali Cloud ecosystem have been integrated with function computing. Events of these services or products will be used as event source trigger functions. Function computed trigger types have been increased from 15+ to 90+, and have been enriched with the addition of EventBridge’s upstream access system.

The console enjoys one-stop service

EventBridge and function computing console can communicate with each other. Users can select function computing as the event processing target on the EventBridge console and enjoy one-stop service on the EventBridge Console. Also in the function calculation console, users can write functions according to the corresponding event types according to different trigger types; Users do not need to jump back and forth between the function calculation console and the event bus console;

Ensure data consistency and stability

The user handles the events of the specified event source by creating triggers on the function computing console. Or use functional computation as an event processing target on the EventBridge console to provide a unified view of resources; At the same time in the bottom system implementation, due to the deep integration of back-end system API, it can ensure that the upper business logic adopts a unified API and processing logic, from the technical level to ensure the consistency of multiple entry functions, and lay a solid foundation for the stable operation of the customer system.

Simplify the complexity of data consumption delivery

For the data consumption scenario, EventBridge is responsible for the connection and data consumption of the upstream system. Users do not need to care about the specific consumption mode of the event source system data. For functional computing users, only the logic of data delivery needs to be considered. Users can directly select the downstream Target provided by EventBridge for data delivery, or only use the SDK provided by EventBridge for data delivery at the code level, greatly simplifying the complexity of data delivery.

Trigger service application scenarios

Let’s explore the actual business production environment and how we can use these two tools to make this happen easily:

Automated operational analysis and presentation

The business system will generate a large number of dynamic indicator data, which needs to be extracted for operation analysis and display. Automatic operation analysis and display can be realized through EventBridge and FC asynchronous series. Traditional schemes require data extraction and analysis based on real-time computing or offline computing products. The whole scheme is heavy and complicated to configure. The data analysis results need to be rendered and pushed predefined, and the service system needs to be manually connected.

The new EDA architecture is adopted, and EventBridge is used to connect business to customize event data. The rule-driven filtering logic is simple. FC can be lightweight to achieve common data analysis operations, code writing and debugging is simpler; EventBridge’s rich push capabilities allow analytics to reach audiences quickly.

Asynchronous decoupling

Engine to trading engine as an example, the trading system as the core of the system, every transaction order data need to be a few a few downstream business system, including items PiJia, delivery, integration, flow calculation and analysis, and so on, several systems of the message processing logic, a single system can not adapt to each associated business. Build business logic with the flexible logic extension capabilities of EventBridge event center and function computation.

New retail greatly promotes Serverless + EDA integration

Large-scale new retail scenarios will be accompanied by an irregular surge of traffic, and businesses with small traffic will also have a sudden increase of system traffic in the surge scenario. Extreme flexibility and stable decoupled architecture are crucial. Based on the traditional mode to develop stable and reliable, high flexibility of background service manpower shortage, tight construction period; A large amount of resources must be reserved to ensure peak traffic, which is idle and wasted in normal off-peak periods. In the new retail promotion scenario, function computing + EventBridge + API gateway is used to build the Serverless mode service middle platform to support massive request access. The system has extreme flexibility, and there is no need to reserve management IaaS resources, which greatly reduces idle cost. At the same time, function calculation provides agile development combined with EventBridge’s low code asynchronous drive, and business iteration efficiency is greatly improved.

conclusion

If the service behind the event is the building block of Ali Cloud ecosystem service, then Serverless function calculation will be the best means to combine these building blocks in a lightweight way and make them artistic. You can use functional calculations to paint these building blocks in more colorful colors and connect them together to create a SaaS/PaaS service artwork that has a lot of imagination.

The EventBridge trigger is now available in all regions of Ali Cloud Computing Console. Please click here to experience it!

For details about trigger creation and configuration, refer to the official help document of Ali Cloud function calculation: help.aliyun.com/document_de…

\