• 事件驱动型工作流 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.

  • 相关阅读:
    第二次冲刺spring会议(第一次会议)
    团队项目(4.15站立会议)
    团队项目(4.14站立会议)
    VB中的GDI编程-1 设备环境DC
    合并多个表格数据的代码
    随机跳转页面之使用VBA公共变量
    快速找到Office应用程序安装路径
    CSS3学习笔记(3)-CSS3边框
    CSS3学习笔记(2)-CSS盒子模型
    测试一下js是否可用
  • 原文地址:https://www.cnblogs.com/lightsong/p/13858443.html
Copyright © 2020-2023  润新知