What is Event Driven Architecture (EDA) and Why Does it Matter EDA 摘要
2010-04-18 16:41
375 查看
出现EDA的原因:
1. Competitive pressure to deal with the increasing pace of business:
2. On-line responses
3. IT capability
交互的三种模式:
1.scheduled
Scheduled activities work fine when the timing of the work is predictable and fast
response to an external entity is not important.
2.pulled
requester (information consumer) does not know when to ask for fresh information.
3.pushed
适合的场景:
A.实时处理
A push application anticipates consumer needs, proactively executes services and then sends critical
information to consumers. By contrast, pull systems are inherently reactive
B.需要多步处理的情况
The second area where push-based relationships are important is in multistep processes
这种情况一般是把需要及时响应的部分使用拉的方式处理,而把其他的步骤用推得方式进行处理
事件是发生的事实
an event is the fact of something happening, such as a bank transaction, stock trade, customer order, address
change, shipment delivery or buying a house
计算机不能处理事件,计算机处理的是事件对象(XML的形式等)
通知就是一个包含事件对象的消息
Event processing is defined as computing that performs operations on event objects.
Event processing includes creating, reading, deleting, transforming and responding to
event objects.
An event processing system has at least two components
(1) a sensor or source that senses events and emits event objects
(2) a consumer or responder that receives and responds to event objects
在Staged EDA 系统中每一个组件可能同时充当这两个角色
EDA是处理推事件对象的软件架构的一种方式,但是不是所有的事件处理都是EDA.事件对象可以被拉,后台事务及推等方式处理,事件对象也可能保存到信息库中后用于进行数据挖掘;或者事件对象可能被打包成远程调用,一个应用是否是EDA需要满足如下的三个条件:
1.事件对象是推过来的(event object is pushed)
事件对象被发送从事件源到消费者通过异步消息在事件被事件源监测到的时候,推的方式能够减少延迟;与拉的方式相比在请求很多的情况下系统将变得无法处理
2.组件在事件到达时进行处理(components process events on arrival)
事件消费者在得到一个事件对象的时候马上进行处理;一个端到端的处理可以马上响应只能在接收到一个事件对象的时候马上处理而不是对待一个计划的时间.
当然在高负载的情况下事件对象到来的时间比处理事件的时间还要快,在这种场景下只能尽可能快的处理事件对象
3.事件对象不指定操作
事件对象不指定操作,事件的消费者在接受到事件对象的时候进行操作.这样可以减少事件源于事件消费者之间的逻辑耦合
事件源在事件发生的时候简单的发送一个消息报告,怎么处理的逻辑由消费者来确定,这样的话开发者可以很灵活的改变,新增一个消费者而不用修改事件源.相反RPC机制以及大多数的请求响应的SOA服务包含一个服务请求者及提供者之间必须达成一致的方法名,因此请求者及提供者在修改的时候必须同步进行
可插入性是EDA系统相比请求应答系统的一个关键优势
EDA不需要使用消息中间件及pub/sub ,尽管他们通常来说很有用.同时消息中间件及pub/sub也不一定要使用EDA的方式实现
pub/sub 也经常用来发布数据而不是消息对象,例如音乐 EDA 不等于消息中间件及pub/sub
1. Competitive pressure to deal with the increasing pace of business:
2. On-line responses
3. IT capability
交互的三种模式:
1.scheduled
Scheduled activities work fine when the timing of the work is predictable and fast
response to an external entity is not important.
2.pulled
requester (information consumer) does not know when to ask for fresh information.
3.pushed
适合的场景:
A.实时处理
A push application anticipates consumer needs, proactively executes services and then sends critical
information to consumers. By contrast, pull systems are inherently reactive
B.需要多步处理的情况
The second area where push-based relationships are important is in multistep processes
这种情况一般是把需要及时响应的部分使用拉的方式处理,而把其他的步骤用推得方式进行处理
事件是发生的事实
an event is the fact of something happening, such as a bank transaction, stock trade, customer order, address
change, shipment delivery or buying a house
计算机不能处理事件,计算机处理的是事件对象(XML的形式等)
通知就是一个包含事件对象的消息
Event processing is defined as computing that performs operations on event objects.
Event processing includes creating, reading, deleting, transforming and responding to
event objects.
An event processing system has at least two components
(1) a sensor or source that senses events and emits event objects
(2) a consumer or responder that receives and responds to event objects
在Staged EDA 系统中每一个组件可能同时充当这两个角色
EDA是处理推事件对象的软件架构的一种方式,但是不是所有的事件处理都是EDA.事件对象可以被拉,后台事务及推等方式处理,事件对象也可能保存到信息库中后用于进行数据挖掘;或者事件对象可能被打包成远程调用,一个应用是否是EDA需要满足如下的三个条件:
1.事件对象是推过来的(event object is pushed)
事件对象被发送从事件源到消费者通过异步消息在事件被事件源监测到的时候,推的方式能够减少延迟;与拉的方式相比在请求很多的情况下系统将变得无法处理
2.组件在事件到达时进行处理(components process events on arrival)
事件消费者在得到一个事件对象的时候马上进行处理;一个端到端的处理可以马上响应只能在接收到一个事件对象的时候马上处理而不是对待一个计划的时间.
当然在高负载的情况下事件对象到来的时间比处理事件的时间还要快,在这种场景下只能尽可能快的处理事件对象
3.事件对象不指定操作
事件对象不指定操作,事件的消费者在接受到事件对象的时候进行操作.这样可以减少事件源于事件消费者之间的逻辑耦合
事件源在事件发生的时候简单的发送一个消息报告,怎么处理的逻辑由消费者来确定,这样的话开发者可以很灵活的改变,新增一个消费者而不用修改事件源.相反RPC机制以及大多数的请求响应的SOA服务包含一个服务请求者及提供者之间必须达成一致的方法名,因此请求者及提供者在修改的时候必须同步进行
可插入性是EDA系统相比请求应答系统的一个关键优势
EDA不需要使用消息中间件及pub/sub ,尽管他们通常来说很有用.同时消息中间件及pub/sub也不一定要使用EDA的方式实现
pub/sub 也经常用来发布数据而不是消息对象,例如音乐 EDA 不等于消息中间件及pub/sub
相关文章推荐
- VS 2005 Web Project System: What is it and why did we do it?
- What is virtual memory, how is it implemented, and why do operating systems use it?
- (Page 1 of 3 )A walking tour of JavaBeans What JavaBeans is, how it works, and why you want to use it
- What is SolrCloud? (And how does it compare to master-slave?)
- what-is-the-bios-and-what-does-it-do
- Why SHRINKFILE is a very bad thing, and what to do about it.
- What is svchost.exe And Why Is It Running? :: the How-To Geek
- (Page 2 of 3 )A walking tour of JavaBeans 2 :What JavaBeans is, how it works, and why you want to use it
- What is the GlobalSuppressions.cs/GlobalSuppressions.vb file and why is it needed
- what is the virtual machine, when and why we need use it ?
- node-haystack Episode 1: What is it and why
- 【html】What is href=“#” and why is it used?
- What is Web Application Architecture? How It Works, Trends, Best Practices and More
- (Page 3 of 3 )A walking tour of JavaBeans What JavaBeans is, how it works, and why you want to use it
- What is a magic number? And why is it bad?
- 《What is deep learning and why is it getting so much attention?》,译名:深度学习的定义及其备受关注的原因
- [POST] What Is the Linux fstab File, and How Does It Work?
- What is Docker and why is it so darn popular?
- What is SynchronizationContext, and what does it mean to capture and use it?
- What is svchost.exe And Why Is It Running?