Skip to content

Commit 7185215

Browse files
committed
Message broke requirements
1 parent 695dc83 commit 7185215

File tree

1 file changed

+139
-0
lines changed

1 file changed

+139
-0
lines changed

guidelines/message-broker.md

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
# MONAI Deploy Message Broker Requirements/Design
2+
3+
## Background
4+
5+
The MONAI Deploy sub-systems, including the Workflow Manager and the Informatics Gateway, use shared virtual storage for sharing data. With the given design, a message broker service must notify all sub-systems when data is available or when an event has occurred.
6+
7+
This document describes and decides on a **default** message broker service to be used in the MONAI Deploy project and defines message topics/events used for publishing and subscribing events.
8+
9+
**Important**: users shall be able to replace the **default** message broker service with their choice, and the design shall consider both on-prem, cloud, and edge deployments.
10+
11+
## Message Broker Services
12+
13+
- [RabbitMQ](https://www.rabbitmq.com/) (default)
14+
- [KubeMQ Server](https://kubemq.io/)
15+
- [Google Cloud Pub/Sub](https://cloud.google.com/pubsub/)
16+
- [Apache Kafka](https://kafka.apache.org/intro)
17+
18+
## Topics
19+
20+
This section defines topics each sub-system publishes in MONAI Deploy.
21+
22+
### Informatics Gateway
23+
24+
* WorkflowRequest (workflow.request)
25+
* ExportTaskCompleted (export.completed)
26+
27+
### Workflow Manager
28+
29+
* ExportTaskRequest (export.request)
30+
* TaskRequest (task.request)
31+
* WorkflowStarted (workflow.started)
32+
* WorkflowCompleted (workflow.completed)
33+
34+
### Task Manager (Part of Workflow Manager)
35+
36+
* TaskStarted (task.started)
37+
* TaskCompleted (task.completed)
38+
39+
## Topic Payload Specs
40+
41+
This section defines the detailed payload of each topic.
42+
43+
### WorkflowRequest
44+
| Field | Type | Description |
45+
|-|-|-|
46+
| Transaction ID | string or UUID | a unique ID to locate the workflow. Used and generated by the event publishers. |
47+
| Correlation ID | string or UUID | a unique ID that traces back to the original request, e.g., a DICOM association |
48+
| Files | string[] | a list of file paths (URN) associated with the request |
49+
| Metadata | string[] | JSON formatted strings associated with the request. E.g., DICOM headers |
50+
| Workflows | string[] | *optional* - a list of workflows to execute |
51+
52+
### ExportTaskCompleted
53+
54+
| Field | Type | Description |
55+
|-|-|-|
56+
| Export Task ID | string or UUID | a unique ID to locate the export task. Generated by the Workflow Manager. |
57+
| Correlation ID | string or UUID | a unique ID that traces back to the original request, e.g., a DICOM association. |
58+
| Transaction ID | string or UUID | the unique ID of the actual workflow request. |
59+
| Status | int (enum )| Status of the export task |
60+
| Message | string | status details |
61+
| Sink | string | Sink assigned for the export task |
62+
63+
#### ExportTask
64+
65+
| Field | Type | Description |
66+
|-|-|-|
67+
| Export Task ID | string or UUID | a unique ID to locate the export task. Generated by the Workflow Manager. |
68+
| Correlation ID | string or UUID | a unique ID that traces back to the original request, e.g., a DICOM association. |
69+
| Transaction ID | string or UUID | the unique ID of the actual workflow request. |
70+
| Files | string[] | a list of file paths (URN) associated with the request |
71+
| Sink | string | Sink assigned for the export task |
72+
73+
#### TaskRequest
74+
75+
| Field | Type | Description |
76+
|-|-|-|
77+
| Transaction ID | string or UUID | a unique ID to locate the workflow. Used and generated by the event publishers. |
78+
| Correlation ID | string or UUID | a unique ID that traces back to the original request, e.g., a DICOM association |
79+
| Payload Path | string | URN to the task payload |
80+
81+
TBD
82+
83+
#### WorkflowStarted
84+
85+
| Field | Type | Description |
86+
|-|-|-|
87+
|-|-|-|
88+
| Transaction ID | string or UUID | a unique ID to locate the workflow. Used and generated by the event publishers. |
89+
| Correlation ID | string or UUID | a unique ID that traces back to the original request, e.g., a DICOM association |
90+
| Status | int (enum) | current status of the workflow |
91+
| State | int (enum) | current state of the workflow |
92+
| DateStarted | datetime | Date time the workflow started |
93+
94+
TBD
95+
96+
#### WorkflowCompleted
97+
98+
| Field | Type | Description |
99+
|-|-|-|
100+
|-|-|-|
101+
| Transaction ID | string or UUID | a unique ID to locate the workflow. Used and generated by the event publishers. |
102+
| Correlation ID | string or UUID | a unique ID that traces back to the original request, e.g., a DICOM association |
103+
| Status | int (enum) | current status of the workflow |
104+
| State | int (enum) | current state of the workflow |
105+
| DateStarted | datetime | Date time the workflow started |
106+
| DateCompleted | datetime | Date time the workflow completed |
107+
108+
109+
TBD
110+
111+
#### TaskStarted
112+
113+
| Field | Type | Description |
114+
|-|-|-|
115+
| Transaction ID | string or UUID | a unique ID to locate the workflow. Used and generated by the event publishers. |
116+
| Correlation ID | string or UUID | a unique ID that traces back to the original request, e.g., a DICOM association |
117+
| Payload Path | string | URN to the task payload |
118+
| Status | int (enum) | current status of the task |
119+
| State | int (enum) | current state of the task |
120+
| DateStarted | datetime | Date time the task started |
121+
122+
123+
TBD
124+
125+
#### TaskCompleted
126+
127+
| Field | Type | Description |
128+
|-|-|-|
129+
| Transaction ID | string or UUID | a unique ID to locate the workflow. Used and generated by the event publishers. |
130+
| Correlation ID | string or UUID | a unique ID that traces back to the original request, e.g., a DICOM association |
131+
| Payload Path | string | URN to the task payload |
132+
| Status | int (enum) | current status of the task |
133+
| State | int (enum) | current state of the task |
134+
| DateStarted | datetime | Date time the task started |
135+
| DateCompleted | datetime | Date time the task completed |
136+
137+
138+
139+
TBD

0 commit comments

Comments
 (0)