Skip to content

Commit f5c26d2

Browse files
committed
gh-48 Design changes for temporary storage
Signed-off-by: Victor Chang <[email protected]>
1 parent 2345730 commit f5c26d2

File tree

6 files changed

+30
-26
lines changed

6 files changed

+30
-26
lines changed

guidelines/diagrams/mig-acr.png

12.5 KB
Loading

guidelines/diagrams/mig-acr.txt

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
# SPDX-License-Identifier: Apache License 2.0
33

44
# Created at https://sequencediagram.org/
5-
title MONAI Informatics Gateway - SCP
5+
title MONAI Informatics Gateway - ACR API
66

77
fontawesome f0f8 "Hospital\nDevices" as HIS
88

99
participantgroup #00CC66 Informatics\nGateway
1010
participant "ACR API" as ACR
1111
participant "Inference Request\nQueue" as IRQ
1212
participant "Data Retrieval Service" as DRS
13-
participant "Payload Assembler" as PA
14-
participant "Payload Notification" as PN
15-
fontawesome f0a0 "Temporary Storage" as TS
13+
participant "Payload Assembler Service" as PA
14+
participant "Payload Notification Service" as PN
15+
participant "Object Upload Service" as OUS
1616
end
1717

1818
participantgroup #FF9966 Virtual\nStorage
@@ -38,12 +38,17 @@ DRS->DRS: Process request
3838
activate DRS
3939
DRS->HIS: Query & retrieve via DICOMweb
4040
DRS<--HIS: Response
41-
DRS->TS: Save DICOM
4241
DRS->DRS: Extract DICOM headers
43-
DRS->DB: Save instance info with DICOM headers
42+
DRS->OUS: Queue DICOM+JSON for upload
43+
activate OUS
44+
OUS->DISK: Upload to temporary bucket path
45+
deactivate OUS
4446
DRS->HIS: Query & retrieve via FHIR
4547
DRS<--HIS: Response
46-
DRS->TS: Save FHIR
48+
DRS->OUS: Queue FHIR for upload
49+
activate OUS
50+
OUS->DISK: Upload to temporary bucket path
51+
deactivate OUS
4752
DRS->DB: Save resource info with headers
4853

4954
DRS->PA: Notify data arrival
@@ -58,6 +63,6 @@ PA->PN: Queue Payload ready message
5863
activate PN
5964
PA<--PN: Response
6065
deactivate PA
61-
PN->DISK: Upload files associated with the payload
66+
PN->DISK: Move files associated with the payload to payload directory
6267
PN->PS: Publish new workflow request
6368
PN<--PS: Response

guidelines/diagrams/mig-scp.png

8.72 KB
Loading

guidelines/diagrams/mig-scp.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ fontawesome f0f8 "Hospital\nDICOM Devices" as DICOM
88

99
participantgroup #00CC66 Informatics\nGateway
1010
participant "DICOM SCP" as SCP
11-
participant "Payload Assembler" as PA
12-
participant "Payload Notification" as PN
13-
fontawesome f0a0 "Temporary Storage" as TS
11+
participant "Payload Assembler Service" as PA
12+
participant "Payload Notification Service" as PN
13+
participant "Object Upload Service" as OUS
1414
end
1515

1616
participantgroup #FF9966 Virtual\nStorage
@@ -44,11 +44,11 @@ activate DICOM
4444
SCP->DB: Query for \nconfigured\nsources
4545
SCP<--DB: Response
4646
SCP->SCP: Validate
47-
SCP->TS: Save to disk
4847
SCP->SCP: Extract DICOM headers
49-
activate SCP
50-
SCP->DB: Save instance info with DICOM headers
51-
deactivate SCP
48+
SCP->OUS: Queue for upload
49+
activate OUS
50+
OUS->DISK: Upload to temporary bucket path
51+
deactivate OUS
5252
SCP->PA: Notify data arrival
5353
activate PA
5454
PA->PA: Queue instance
@@ -64,7 +64,7 @@ PA->PN: Queue Payload ready message
6464
activate PN
6565
PA<--PN: Response
6666
deactivate PA
67-
PN->DISK: Upload files associated with the payload
67+
PN->DISK: Move files associated with the payload to payload directory
6868
PN->PS: Publish new workflow request
6969
PN<--PS: Response
7070
end

guidelines/diagrams/storage.png

-217 Bytes
Loading

guidelines/srs.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ MIG Storage SCP service can be configured to accept all incoming association req
132132

133133
#### Retry Logic
134134

135-
(REQ-FNC-01) The system would retry the following actions upon failure.
135+
(REQ-FNC-01) The system would retry the following actions upon failure.
136136

137137
| Action | Retry Delay | Maximum Retries |
138138
| ------------ | ----------------------- | --------------- |
@@ -174,7 +174,7 @@ Not applicable.
174174

175175
#### Retry Logic
176176

177-
(REQ-FNC-01) The system would retry the following actions upon failure.
177+
(REQ-FNC-01) The system would retry the following actions upon failure.
178178

179179
| Action | Retry Delay | Maximum Retries |
180180
| ------ | ----------------------- | --------------- |
@@ -297,10 +297,9 @@ The following APIs are supported to interact with the ACR-DSI API:
297297

298298
![Storage](diagrams/storage.png)
299299

300-
MIG stores all received & retrieved medical records first in the temporary storage before the dataset is assembled (grouped) by the `Payload Assembler` based on the AE Title's configuration. Once data is assembled into a `Payload` object, MIG uploads all the files to the virtual storage device specified in the configuration file.
301-
302-
MIG ships with [MinIO](https://min.io/) as the default storage service provider given that it supports local, on-prem and cloud storage solutions. However, the default storage service can be easily replaced by implementing the [Monai.Deploy.InformaticsGateway.Api.Storage.IStorageService](https://github.com/Project-MONAI/monai-deploy-informatics-gateway/blob/main/src/Api/Storage/IStorageService.cs) interface. This enables users to extend MIG to meet their needs.
300+
MIG uploads all received & retrieved medical records to the storage service before the dataset is assembled (grouped) by the `Payload Assembler` based on the AE Title's configuration. Once data is assembled into a `Payload` object, MIG issues **move** commands using the storage API.
303301

302+
MIG ships with [MinIO](https://min.io/) as the default storage service provider given that it supports local, on-prem and cloud storage solutions. However, the default storage service can easily be replaced by writing your own plug-in. See [MONAI Deploy Storage](https://github.com/Project-MONAI/monai-deploy-storage) project for more information. The plug-in architecture enables users to extend MIG by writing their own storage plug-ins.
304303

305304
#### Retry Logic
306305

@@ -318,7 +317,7 @@ Informatics Gateway and the Workflow Manager follow the publisher-subscriber pat
318317

319318
![Message Broker](diagrams/message-broker.png)
320319

321-
MIG publishes and subscribes events to/from other subsystems using the `IMessageBrokerPublisherService` interface and `IMessageBrokerSubscriberService` interface, respectively. The default message broker service used is provided by [RabbitMQ](https://www.rabbitmq.com/).
320+
MIG publishes and subscribes events to/from other subsystems using the `IMessageBrokerPublisherService` interface and `IMessageBrokerSubscriberService` interface, respectively. The default message broker service used is provided by [RabbitMQ](https://www.rabbitmq.com/).
322321

323322
With RabbitMQ, IG publishes message to the exchange (`InformaticsGateway>messaging>publisherSettings>exchange`) with different *routing keys* based on the event type listed in the following sections.
324323

@@ -329,7 +328,7 @@ Each event is associated with a specific type and is serialized to JSON before s
329328
- Workflow Request event
330329
- Routing Key: `md.workflow.request`
331330
- Class name: `WorkflowRequestMessage`
332-
331+
333332
| Property | Type | Description |
334333
| ------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
335334
| Bucket | string | Name of the bucket/directory name, which can be used to locate the payload on the shared storage. |
@@ -356,7 +355,7 @@ Each event is associated with a specific type and is serialized to JSON before s
356355
- Export Complete event
357356
- Routing Key: `md.export.complete`
358357
- Class name: `ExportCompleteMessage`
359-
358+
360359
| Property | Type | Description |
361360
| ------------ | ------------- | ------------------------------------------------------------- |
362361
| WorkflowId | string (UUID) | A UUID generated by the Workflow Manager. |
@@ -371,11 +370,11 @@ Each event is associated with a specific type and is serialized to JSON before s
371370
- DIMSE SCU Export Service: `md.export.request.monaiscu`
372371
- DICOMweb Export Service: `md.export.request.monaidicomweb`
373372
- Class name: `ExportRequestMessage`
374-
373+
375374
| Property | Type | Description |
376375
| ------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
377376
| WorkflowId | string (UUID) | A UUID generated by the Workflow Manager. |
378377
| ExportTaskId | string (UUID) | A UUID generated by the Workflow Manager for the export task. |
379378
| Files | string[] | A list of files to be exported. |
380379
| Destination | string | Export destination. For DICOM C-STORE, a named DICOM destination. For ACR request, use the Transaction ID in the original request. |
381-
| CorrelationId | string | For DIMSE, the correlation ID is the UUID associated with the first DICOM association received. For an ACR inference request, use the Transaction ID in the original request. |
380+
| CorrelationId | string | For DIMSE, the correlation ID is the UUID associated with the first DICOM association received. For an ACR inference request, use the Transaction ID in the original request. |

0 commit comments

Comments
 (0)