当前位置:网站首页>In-depth analysis of Apache EventMesh cloud-native distributed event-driven architecture
In-depth analysis of Apache EventMesh cloud-native distributed event-driven architecture
2022-08-09 23:43:00 【hebiwen95】
一、前言
近年来,随着微服务、云原生和 Serverless 概念的普及以及容器化技术的发展,事件驱动也再次成为热点,引起 IT 界广泛的关注.事件驱动架构是一种用于设计应用的软件架构和模型.对于事件驱动系统而言,事件的捕获、通信、处理和持久保留是解决方案的核心结构.事件驱动架构可以最大程度减少耦合度,很好地扩展与适配不同类型的服务组件,因此是现代化分布式应用架构的理想之选.
This article will analyze from the following aspects Apache EventMesh Cloud-native distributed event-driven architecture:
什么是 EventMesh
Event-driven architecture model under cloud native ecology
EventMesh 架构
EventMesh related features and application scenarios
总结回顾
Future planning and development
二、什么是 EventMesh
Apache EventMesh 是⼀个⽤于解耦应⽤and dynamic cloud primitives for the backend middleware layer⽣事件驱动架构基础设施.它⽀持⼴泛的⽤例,Including complex hybrid clouds、使⽤Distributed architecture of different technology stacks.

We can see in the picture above EventMesh The location is a middle tier that connects cloud applications and infrastructure, Event Mesh 与 Service Mesh 具有同等的定位,And it natively supports cloud-native deployment methods and can be used in Kubernetes 上运行.
Service Mesh 更多的是集成 RPC 的服务,是同步调用的,There may be some degree of coupling.而对于 Event Mesh 来说,More of an integrated event-driven microservice,The characteristics of such microservices are loose coupling and asynchronous.
三、Event-driven architecture model under cloud native ecology
3.1 Event orchestration and computation

从上面这张图可以看出,EventMesh There are many applications that can be accessed:分布式应用、Cloud-native applications and services、IoT 设备、数据流、Cloud partners and other cloud vendors.通过标准的 CloudEvents 协议接入到 EventMesh,through this event-driven architecture,It can improve the elastic scalability of the application,because they use it EventMesh The decoupling of communication is achieved.
EventMesh 内部具有 Orchestrator 的能力,Data source triggers and real-time processing functions can be customized,for other received events,Orchestrator can be routed to these services,Includes serverless computing(像容器、函数、IoT 应用)、Monitoring or notification services、Data analysis services.
3.2 事件驱动 WebHook

举个例子,比如我在 Github 上提了一个 PR,In fact, this can be configured WebHook 的,In fact, it is a notification mechanism similar to this bypass message,any changes,will be sent.For notification services,It doesn't care who is being pushed to,And don't pay attention to how or by whom the events I generate are used by you,It just focuses on generating events.
It is accessed based on such a scenario EventMesh 的话,那 EventMesh In fact, it has event routing、事件转换、The ability to filter events,You can configure corresponding rules based on such events,such as forward filtering、排除过滤.
四、EventMesh 架构

EventMesh It provides a lightweight client to the outside world,Standardize interfaces and protocols.上面我们有讲到 EventMesh The positioning is based on the middle layer of application and infrastructure.Applications can be accessed through a lightweight client EventMesh,And then realize the decoupling of strong binding with the infrastructure.
The left part of the picture above is us EventMesh 内部的一个架构,EventMesh Different types are provided externally API,包括 Java、Go、C、Python 等.The middle part on the left is actually EventMesh 的运行时状态,It supports clustering natively Gateway 的方式部署,Containerization is also supported Sidecar 的方式部署.
EventMesh The interior is mainly divided into the following parts:协议、可观测性、处理器、Orchestration and storage.Different parts have been plugged in,Like the partial support of the protocol HTTP、TCP、gRPC、MQTT,Internal communication will be converted into CloudEvents,Equivalent to the function of the adapter.
五、EventMesh related features and application scenarios
5.1 EventMesh 插件化设计
SPI(Service Provider Interface)机制

设计思想:
遵循开闭原则
Programming for standardized interfaces+策略模式+配置文件
Decouple the runtime from plugins,Easy to extend plugins,As well as dynamically loading plugins at runtime
5.2 Data Mesh
![]()
借助 EventMesh The event source and event target can be connected,比如左边的 RDMS The data in the relational database has been updated,EventMesh The event target will be notified in the form of a notification eg MQ,This enables cross-message middleware、A sync across storage.In fact, here is the help EventMesh brige 的能力,It just looks like cross component,But actually on both sides EventMesh Probably not a cluster,It can actually cross the network,In a big way, it can also communicate across enterprises,And data exchange between public cloud and private cloud.
场景一:Traffic replication across network regions

场景二:Store data transfer across events

5.3 EventMesh Workflow
场景:电商场景

EventMesh In the whole event-driven system,It is the ability to arrange events,EventMesh There will be workflow engines for serverless computing,同时配合 AsyncAPI,AsyncAPI A description of these service nodes can be defined,Workflow The work engine is compliant Serverless Workflow 规范标准的,In this way, a set of workflow customization and operation can be completed.
Online Store App Service DSL

Order Service DSL

Other Service DSLs …
5.4 EventMesh Workflow Engine

EventMesh Workflow Engine 主要分为三大块:EventMesh Catalog、EventMesh Workflow Engine、EventMesh Runtime.
对于 EventMesh Catalog 而言,In fact, which services are defined,定义了之后,通过 Catalog 内部的 AsyncAPI 解析器,解析出来 Publisher Module、Channel Module、Subscriber Module,These nodes are in the workflow below DSL 定义,EventMesh Workflow Engine 解析到 Workflow 节点后,会跟 EventMesh Catalog have an interaction,Will check what services are available Publisher 以及 Subscriber,Engine After the event is triggered here,会发给 EventMesh Runtime,Finally, it will be pushed to downstream applications,the whole set EventMesh Workflow Engine It can realize the flow of workflow.
六、总结回顾
轻松构建松耦合、分布式事件驱动架构.
开放兼容,原生支持 CloudEvents SDK 和 API,易扩展.
打破数据孤岛,Support enterprise full connection、数字化、多云协同.
七、未来发展与规划

边栏推荐
- The overall construction process of the Tensorflow model
- Xiaohei leetcode's refreshing rainy day trip, just finished eating Yufei Beef Noodles, Mala Tang and Beer: 112. Path Sum
- STC8H development (15): GPIO drive Ci24R1 wireless module
- AI+Medical: Using Neural Networks for Medical Image Recognition and Analysis
- json事例
- 【微服务~Nacos】Nacos之配置中心
- Use zeros(), ones(), fill() methods to generate data in TF
- APP自动化测试框架-UiAutomator2基础入门
- 深度剖析 Apache EventMesh 云原生分布式事件驱动架构
- 从产品角度看 L2 应用:为什么说这是一个游乐场?
猜你喜欢

Bean life cycle
![[Cloud Native] 4.2 DevOps Lectures](/img/d0/2cd32351234401fdfecd3a829a639d.png)
[Cloud Native] 4.2 DevOps Lectures

在VMware上安装win虚拟机

AI Knows Everything: Building and Deploying a Sign Language Recognition System from Zero

CVPR22 Oral | shunt through multi-scale token polymerization from attention, code is open source

AI+Medical: Using Neural Networks for Medical Image Recognition and Analysis

Synchronization lock synchronized traces the source

APP automation test framework - UiAutomator2 introductory

小黑leetcode之旅:94. 二叉树的中序遍历(补充Morris 中序遍历)

从源码方面来分析Fragment管理中 Add() 方法
随机推荐
好未来,想成为第二个新东方
AI Knows Everything: Building and Deploying a Sign Language Recognition System from Zero
在“企业通讯录”的盲区,融云的边界与分寸
Pagoda measurement - building LightPicture open source map bed system
AI识万物:从0搭建和部署手语识别系统
L3-2 Delete up to three characters (30 points)
4D Summary: 38 Knowledge Points of Distributed Systems
JS解混淆-AST还原案例
台风生成,广州公交站场积极开展台风防御安全隐患排查
CVPR22 Oral | shunt through multi-scale token polymerization from attention, code is open source
SecureCRT background color
2022 首期线下 Workshop!面向应用开发者们的数据应用体验日来了 | TiDB Workshop Day
STC8H开发(十五): GPIO驱动Ci24R1无线模块
单元测试
Leetcode 93 IP addresses
编程语言中,取余和取模的区别
MLOps的演进历程
Sudoku | Backtrack-7
NIO Cup 2022 Nioke Summer Multi-School Training Camp 7 CFGJ
Cookie, session, token

