zoukankan      html  css  js  c++  java
  • 事件驱动型工作流 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.

  • 相关阅读:
    lambda 是个啥玩意
    python中读写操作plist
    通过os中的os.path.basename获取路径中的文件名
    python遍历目录的两种方法
    mac下已有pyhon2.7,装了python3 之后,怎么调用python3啊
    Python: easy_install & pip 下载PyPi 公共资源库的工具
    安装python的图形处理库: pillow
    minSdkVersion, targetSdkVersion, targetApiLevel,compileSdkVersion,buildToolsVersion
    bat 批量修改文件名字
    a b两向量叉乘 <0说明a在b左边
  • 原文地址:https://www.cnblogs.com/lightsong/p/13858443.html
Copyright © 2011-2022 走看看