Skip to content

Commit 97c5b92

Browse files
committed
add architecture part 1
1 parent 4256700 commit 97c5b92

14 files changed

Lines changed: 109 additions & 0 deletions

docs/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ For production environment we recommend moving to kubernetes
77

88
Read more about the [security model here](securitymodel).
99

10+
Read more about the [architecture here](architecture).
11+
1012
#### Quick start using docker
1113
Installing using [docker-compose](dockercompose)
1214

docs/architecture.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## Architecture
2+
3+
OpenFlow is an extendible stack, it's core components consist of a [MongoDB](https://www.mongodb.com/) database (preferably a replica set to allow support for change streams )
4+
A stateless [RabbitMQ](https://www.rabbitmq.com/) (but if needed you can run with durable queues and persistent storage)
5+
And the OpenFlow API and web interface.
6+
If deployed in docker, you can the spin up multiple NodeRED instances using the API or from the we interface.
7+
Different types of clients, [custom web](https://github.com/open-rpa/openflow-web-angular11-template) interfaces, [OpenRPA](https://github.com/open-rpa/openrpa) robots, PowerShell modules and remotely installed NodeRED's can then connect to the OpenFlow API using web sockets and receive events and data. Clients will use the API to register/publish queues and exchanges in order to add an extra layer of authentication and to simply for network requirements. All database access is exposed as natively close to the MongoDB driver, but with an added layer of security though the API
8+
9+
If installed [using NPM](https://openflow.openiap.io/npmopenflow) or the basic [docker-compose](https://github.com/open-rpa/openflow/blob/master/docker-compose.yml) file that would like something like this
10+
11+
![openflow_basic](architecture/openflow_basic.png)
12+
13+
But for most people you should go for the docker install using [traefik](https://traefik.io/) as an ingress controller/reverse proxy. This way we can segregate internal traffic that only OpenFlow should know about from traffic going in and out to the rest of the network/world. That will look something like below
14+
15+
![openflow_traefik](architecture/openflow_with_traefik.png)
16+
17+
For bigger installations we recommend using kubernetes. Besides adding easy access for running geo distributed installation ( multiple data centers ) it also adds more layers of security and much needed fault tolerance and scalability. This is usually also when we want to add better monitoring of the core components and support for designing graphs and dashboard based on data in OpenFlow.
18+
19+
![openflow_with_otel](architecture/openflow_with_monitoring.png)

docs/architecture/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__pycache__

docs/architecture/diagram.py

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
from diagrams import Cluster, Diagram
2+
from diagrams.aws.compute import ECS, EC2
3+
from diagrams.onprem.database import Mongodb
4+
from diagrams.onprem.queue import Rabbitmq
5+
from diagrams.gcp.analytics import BigQuery, Dataflow, PubSub
6+
from diagrams.programming.language import Nodejs
7+
from diagrams.onprem.monitoring import Grafana, Prometheus
8+
from diagrams.aws.database import RDS
9+
from diagrams.aws.network import ELB
10+
from diagrams.aws.storage import S3
11+
from diagrams.onprem.network import Traefik
12+
from diagrams.custom import Custom
13+
from diagrams.onprem.tracing import Jaeger
14+
from diagrams.onprem.database import Cassandra
15+
16+
with Diagram("OpenFlow Basic"):
17+
with Cluster("Backend"):
18+
b = [Mongodb("MongoDB"), Rabbitmq("RabbitMQ")]
19+
with Cluster("Remote Clients"):
20+
rc = [Custom("OpenRPA", "./my_resources/open_rpa128.png"), Custom("PowerShell",
21+
"./my_resources/PowerShell_5.0_icon.png"), Custom("NodeRED", "./my_resources/node-red-icon.png")]
22+
with Cluster("Frontend + API"):
23+
api = EC2("WEB-API")
24+
Custom("NodeRED", "./my_resources/node-red-icon.png")
25+
b << api
26+
api << rc
27+
28+
with Diagram("OpenFlow with Traefik"):
29+
30+
with Cluster("Backend"):
31+
b = [Mongodb("MongoDB"), Rabbitmq("RabbitMQ")]
32+
33+
with Cluster("Remote Clients"):
34+
rc = [Custom("OpenRPA", "./my_resources/open_rpa128.png"), Custom("PowerShell",
35+
"./my_resources/PowerShell_5.0_icon.png"), Custom("NodeRED", "./my_resources/node-red-icon.png")]
36+
37+
with Cluster("Frontend + API"):
38+
api = EC2("WEB-API")
39+
cn = Custom("NodeRED", "./my_resources/node-red-icon.png")
40+
41+
t = Traefik("Traefik")
42+
43+
b << api
44+
cn << t
45+
api << t
46+
t << rc
47+
48+
49+
with Diagram("OpenFlow with Monitoring"):
50+
51+
with Cluster("Backend"):
52+
b = [Mongodb("MongoDB"), Rabbitmq("RabbitMQ")]
53+
54+
with Cluster("Remote Clients"):
55+
rc = [Custom("OpenRPA", "./my_resources/open_rpa128.png"), Custom("PowerShell",
56+
"./my_resources/PowerShell_5.0_icon.png"), Custom("NodeRED", "./my_resources/node-red-icon.png")]
57+
58+
with Cluster("Frontend + API"):
59+
api = EC2("WEB-API")
60+
cn = Custom("NodeRED", "./my_resources/node-red-icon.png")
61+
62+
with Cluster("Monitoring"):
63+
g = Grafana("Grafana")
64+
p = Prometheus("Prometheus")
65+
otel = EC2("Open Telemetry")
66+
j = Jaeger("Jaeger")
67+
c = Cassandra("Cassandra")
68+
69+
t = Traefik("Traefik")
70+
71+
b << api
72+
cn << t
73+
api << t
74+
t << rc
75+
76+
otel << b
77+
otel << rc
78+
otel << api
79+
otel << cn
80+
81+
c << j
82+
j << otel
83+
84+
p << otel
85+
p << g
86+
api << g
87+
g << t
8.07 KB
Loading
159 KB
Loading
15 KB
Loading
15 KB
Loading
5.57 KB
Loading
1.23 KB
Loading

0 commit comments

Comments
 (0)