EDF project#
Hint
This Diagram was made thanks to Azza and Lucien. It’s meant to be shown to a client(EDF). I did two versions of it, the first one is a classical mermaid. The second is more sophisticated it’s made using a new diagramming tool introduced by Alexis during a lightning talk.
First Draft (from Lucien)#
Here is a first draft made by Lucien on Excalidraw.
Mermaid (.rst)#
graph TD
subgraph A[SFTP\nMazars]
B[ZFIR20M\nledger]
C[ZFIR21]
D[ZFIR22\nassets]
E[ZFIR23\ncontracts]
end
A-->|cron|srv[srv 00]
srv-->|inotify?|ing[ingest.py]
ing-->z[zip] & mo[Mongo]
mo-->pro[process.py]
pro-->mo
mo-->api[Fast API]-->front[Front\nbrowser]
graph TD
subgraph A[SFTP\nMazars]
B[ZFIR20M\nledger]
C[ZFIR21]
D[ZFIR22\nassets]
E[ZFIR23\ncontracts]
end
A-->|cron|srv[srv 00]
srv-->|inotify?|ing[ingest.py]
ing-->z[zip] & mo[Mongo]
mo-->pro[process.py]
pro-->mo
mo-->api[Fast API]-->front[Front\nbrowser]
Note
The classical mermaid is not really efficient since the diagram is for a client we need something cleaner with colors, images. Therefore the diagramming tool presented by Alexis
Diagram (.py)#
from diagrams import Diagram, Cluster, Edge
from diagrams.onprem.database import MongoDB
from diagrams.programming.framework import FastAPI
from diagrams.programming.language import Python
from diagrams.aws.iot import IotAnalyticsDataStore
from diagrams.generic.storage import Storage
from diagrams.oci.storage import FileStorage
from diagrams.digitalocean.network import Domain
with Diagram("Add period for files other than ledger upsert MongoDB (bulk)",
show=False, direction="LR"):
ingest = Python("ingest.py")
process = Python("process.py")
srv = Storage("srv 00")
mongo = MongoDB("Mongo")
api = FastAPI("Fast API")
front = Domain("Front\n(browser)")
zip_ = FileStorage("zip")
with Cluster("SFTP\nMazars"):
stfp = [IotAnalyticsDataStore("ZFIR20M\n(ledger)"),
IotAnalyticsDataStore("ZFIR21"),
IotAnalyticsDataStore("ZFIR22\n(assets)"),
IotAnalyticsDataStore("ZFIR23\n(contracts)")]
stfp >> Edge(label="cron") >> srv
srv >> Edge(label="inotify?") >> ingest
ingest >> [zip_, mongo]
mongo >> api >> front
process >> mongo >> process