Skip to content

Commit 021dc22

Browse files
committed
split the mermaid diagram into two (producer and consumer) mermaid diagram to improve readability
1 parent 2e5ed80 commit 021dc22

File tree

1 file changed

+34
-24
lines changed

1 file changed

+34
-24
lines changed

docs/ingestion_service.md

+34-24
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
# Ingestion Service Flow Diagram
44

5-
6-
```{mermaid}
5+
```{mermaid}
76
sequenceDiagram
87
%% Client/User on the left
98
box MistyRose Client
@@ -12,27 +11,14 @@ sequenceDiagram
1211
1312
box Thistle Producer
1413
participant API as Producer API
15-
participant Validator as Producer Validator
16-
participant Publisher as Producer RabbitMQ Publisher
14+
participant Validator as Shared.py
15+
participant Publisher as RabbitMQ Publisher
1716
end
1817
19-
box LightGoldenRodYellow RabbitMQ Queue
18+
box LightGoldenRodYellow RabbitMQ
2019
participant RabbitMQ as RabbitMQ Queue
2120
end
2221
23-
box HoneyDew Consumer
24-
participant Consumer as Worker Consumer/Listener
25-
participant Processor as Worker Processor
26-
end
27-
28-
box AliceBlue Query Service
29-
participant QueryService as Query Service
30-
end
31-
32-
box Wheat Graph Database
33-
participant GraphDB as Graph Database
34-
end
35-
3622
%% Client submits data
3723
Client->>API: 1. POST data (JSON-LD, TTL, etc.)
3824
activate API
@@ -54,25 +40,49 @@ sequenceDiagram
5440
API-->>Client: 400 Bad Request
5541
end
5642
deactivate API
43+
```
44+
45+
```{mermaid}
46+
sequenceDiagram
47+
%% Client/User on the left
48+
49+
box LightGoldenRodYellow RabbitMQ
50+
participant RabbitMQ as RabbitMQ Queue
51+
end
52+
53+
box HoneyDew Consumer
54+
participant Consumer as Listener
55+
participant Processor as Shared.py
56+
end
57+
58+
box AliceBlue Query Service
59+
participant QueryService as Query Service
60+
end
61+
62+
box Wheat Graph Database
63+
participant GraphDB as Graph Database
64+
end
65+
66+
5767
5868
%% Worker service processes the message
59-
RabbitMQ->>Consumer: 5. Consume message
69+
RabbitMQ->>Consumer: 1. Consume message
6070
activate Consumer
61-
Consumer->>Processor: 6. Process data
71+
Consumer->>Processor: 2. Process data
6272
activate Processor
6373
6474
%% Processing steps
65-
Processor->>Processor: 7. Add provenance metadata
75+
Processor->>Processor: 3. Add provenance metadata
6676
6777
%% Acknowledge message
6878
Processor-->>Consumer: Processing complete, provenance attached
6979
7080
%% Send to query service
71-
Consumer->>QueryService: 8. Send processed data
81+
Consumer->>QueryService: 4. Send processed data
7282
activate QueryService
7383
7484
%% Store in database
75-
QueryService->>GraphDB: 9. Store in graph database
85+
QueryService->>GraphDB: 5. Store in graph database
7686
activate GraphDB
7787
GraphDB-->>QueryService: Storage confirmation
7888
deactivate GraphDB
@@ -83,6 +93,6 @@ sequenceDiagram
8393
%% Acknowledge message
8494
Processor-->>Consumer: Processing complete
8595
deactivate Processor
86-
Consumer->>RabbitMQ: 10. Acknowledge message
96+
Consumer-->>RabbitMQ: 6. Acknowledge message
8797
deactivate Consumer
8898
```

0 commit comments

Comments
 (0)