-
Notifications
You must be signed in to change notification settings - Fork 0
/
diagram.d2
48 lines (41 loc) · 946 Bytes
/
diagram.d2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Scheduled Queue: {
Consumers: {
app: "" {
shape: image
icon: https://cdn4.iconfinder.com/data/icons/logos-brands-5/24/rust-1024.png
}
c1: consumer 1
c2: consumer 2
c3: consumer 3
c: ...
}
Producers: {
app: "" {
shape: image
icon: https://cdn4.iconfinder.com/data/icons/logos-brands-5/24/rust-1024.png
}
p1: producer 1
p2: producer 2
}
Redis: {
shape: image
icon: https://cdn4.iconfinder.com/data/icons/redis-2/1451/Untitled-2-1024.png
}
Producers.p1 -> Redis: task 1, task 2, task 3
Producers.p2 -> Redis: task 4, task 5
Redis -> Consumers.c1: "[task 1, task 2, task 3]"
Redis -> Consumers.c2: "[task 4]"
Redis -> Consumers.c3: "[task 5]"
Redis -> Consumers.c: "..."
}
Interface: {
grid-columns: 1
Producer: {
shape: class
schedule(task String, score f64)
}
Consumers: {
shape: class
poll(score f64): Vec<String>
}
}