事件驅動型工作流 vs 引擎型工作流


事件驅動型

此工作流實際上產生於事件驅動軟件架構,

將軟件系統切分為若干獨立運行的子系統(進程),

每個子系統同時具有發送和接受事件消息的能力。

工作流定義依賴各個子系統發送和接受事件的定義, 分散在各個子系統中。

 

對於工作流管理流管理

優點:

松散耦合,擴展性好。

缺點:

工作流的總體拓撲沒有總體控制組件,不便於管理。

 

http://www.ruanyifeng.com/blog/2016/09/software-architecture.html

對於簡單的項目,事件隊列、分發器和事件通道,可以合為一體,整個軟件就分成事件代理和事件處理器兩部分。

優點

  • 分布式的異步架構,事件處理器之間高度解耦,軟件的擴展性好
  • 適用性廣,各種類型的項目都可以用
  • 性能較好,因為事件的異步本質,軟件不易產生堵塞
  • 事件處理器可以獨立地加載和卸載,容易部署

缺點

  • 涉及異步編程(要考慮遠程通信、失去響應等情況),開發相對復雜
  • 難以支持原子性操作,因為事件通過會涉及多個處理器,很難回滾
  • 分布式和異步特性導致這個架構較難測試

 

引擎型工作流

工作流引擎,將工作流的拓撲集中管理,監控。可以解決事件型工作流的缺點。

 

https://en.wikipedia.org/wiki/Workflow_engine

A workflow engine is a software application that manages business processes. It is a key component in workflow technology and typically makes use of a database server.

A workflow engine manages and monitors the state of activities in a workflow, such as the processing and approval of a loan application form, and determines which new activity to transition to according to defined processes (workflows).[1] The actions may be anything from saving an application form in a document management system to sending a reminder e-mail to users or escalating overdue items to management. A workflow engine facilitates the flow of information, tasks, and events. Workflow engines may also be referred to as Workflow Orchestration Engines.[2]

 

https://towardsdatascience.com/scaling-apache-airflow-for-machine-learning-workflows-f2446257e495

 

 

Scaling Apache Airflow with Executors

Apache Airflow has a multi-node architecture based on a scheduler, worker nodes, a metadata database, a web server and a queue service.

 
Image for post

Example Airflow architecture.

One of the first choices when using Airflow is the type of executor. The executor communicates with the scheduler to allocate resources for each task as they’re queued. The difference between executors comes down to the resources they’ve available.

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM