Conductor 是通过Gradle管理依赖的。很多童鞋,可能对Gradle不熟悉,在初步启动的时候就遭遇瓶颈。
在要学习和了解一个项目的时候:
- 第一点是要看官方文档,熟悉项目架构;
- 第二点就要启动项目,对项目的运行情况有个整体认知;
项目结构
前面文章已经熟悉了项目的内部应用架构(或者称为概念关系);接下来就要熟悉项目的部署架构,以及项目模块结构。
官方提供的项目结构如下:
Artifact | Description | 描述 |
---|---|---|
conductor-common | Common models used by various conductor modules | 各种conductor模块使用的通用模块 |
conductor-core | Core Conductor module | conductor 的核心模块 |
conductor-redis-persistence | Persistence and queue using Redis/Dynomite | redis存储支持模块 |
conductor-cassandra-persistence | Persistence using Cassandra | Cassandra 存储模块 |
conductor-es6-persistence | Indexing using Elasticsearch 6.X | es 模块 |
conductor-rest | Spring MVC resources for the core services | 核心服务的spring mvc 暴露的资源 |
conductor-ui | node.js based UI for Conductor | 基于node.js的ui页面 |
conductor-client | Java client for Conductor that includes helpers for running worker tasks | Conductor 的 Java 客户端,包括运行工作任务的工具 |
conductor-client-spring | Client starter kit for Spring | 客户端的starter的工具 |
conductor-java-sdk | SDK for writing workflows in code | 通过代码写工作流的sdk |
conductor-server | Spring Boot Web Application | conductor 服务端 |
conductor-redis-lock | Workflow execution lock implementation using Redis | 分布式锁通过redis实现 |
conductor-awss3-storage | External payload storage implementation using AWS S3 | s3存储的实现 |
conductor-awssqs-event-queue | Event queue implementation using AWS SQS | 基于AWS SQS 实现的事件队列 |
conductor-http-task | Workflow system task implementation to send make requests | 工作流系统任务通过http发送请求的实现 |
conductor-json-jq-task | Workflow system task implementation to evaluate JSON using jq | 利用工作流系统任务执行来评估 JSON |
conductor-grpc | Protobuf models used by the server and client | grpc的客户端和服务端使用的Protobuf模块 |
conductor-grpc-client | gRPC client to interact with the gRPC server | 与 gRPC 服务器交互的 gRPC 客户端 |
conductor-grpc-server | gRPC server Application | grpc服务端 |
conductor-test-harness | Integration and regression tests | 集成和回归测试 |
通过官方项目模块看到基础组件需要依赖ES,Redis,Cassandra等组件。官方还提供了社区提供的扩展仓库介绍如下:
Parent Folder | Description | 描述 |
---|---|---|
event-queue | Support for external eventing systems like AMQP and NATS | 事件队列,支持扩展AMQP和NATS |
external-payload-storage | Storage for large workflow payloads | 存储支持的扩展pg和azureblob |
index | Indexing for searching workflows | 支持es7 |
metrics | Support for various metrics integrations including Datadog and Prometheus | 支持datadog和Prometheus |
persistence | Persistence for metadata, execution and queue implementation | 支持mysql和pg |
task | Various system tasks - Kafka Publish | 支持kakfa发布 |
lock | Workflow execution lock implementation | 支持zookeeper的实现 |
workflow-event-listener | Workflow Status Listener and Binary compatibility with previously published conductor-contribs | 工作流程状态监听器和二进制与先前发布的指挥- conductor-contribs |
通过社区的扩展,可以支撑Conductor的环境更加多样化,诸神也可以根据自己的需要进行扩展,比如对nacos的支持等。对于组件的依赖是必然的,想要启动的服务,需要部署相关的组件。想要运行起来,依赖的环境列表至少要包含必须的环境:
- 准备Java环境是必不可少的
- 准备Gradle环境
- MySQL
- 准备Redis环境
- 准备ES环境
下一节进行项目的编译和启动。