Skip to content

Commit 2491a35

Browse files
committed
adds: initial architecture diagram.
1 parent 4777773 commit 2491a35

File tree

4 files changed

+119
-4
lines changed

4 files changed

+119
-4
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
The Solid Stream Notifications Cache is a service which works on top of one or more Solid Pods to provide an immediate cache for the clients to consume the streaming data stored in the Solid Pods. The Stream Registry maintains state with the Solid Pods and provides a REST API for the clients to interact with the registry instead of the Solid Pods directly. As the experiment done by the maintainers of [CSS](https://github.com/CommunitySolidServer/CommunitySolidServer) demonstrated [here](https://github.com/CommunitySolidServer/CommunitySolidServer/issues/1843#issuecomment-1948600398), the different configurations of the Solid Server can handle around 1k - 2k concurrent GET requests. Some configurations however, such as using the distributed locking approach with the Redis server, it can handle around 15k requests. However, only when the lock expiration time is set to a maximum of 5 minutes (which is not feasible). In cases where there are 3k concurrent GET requests, the response time for the requests is too high. In the expriment done, it took around 17 seconds to respond to 3k concurrent GET requests. This is not feasible for a real-time application as the 2999th client will have to wait for 17 seconds to get the response. The Solid Stream Notifications Cache is designed to solve this problem by providing a cache for the clients to consume the streaming data stored in the Solid Pods.
44

5+
An initial architecutre (not final) of the Solid Stream Notifications Cache is shown below:
6+
7+
![Solid Stream Notifications Cache Architecture](./architecture.png)
8+
59
## License
610
This code is copyrighted by [Ghent University - imec](https://www.ugent.be/ea/idlab/en) and released under the [MIT License](./LICENSE).
711

architecture.drawio

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
<mxfile host="65bd71144e">
2+
<diagram id="pQMxsIvCESUNmnZHtjT-" name="Page-1">
3+
<mxGraphModel dx="936" dy="795" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
4+
<root>
5+
<mxCell id="0"/>
6+
<mxCell id="1" parent="0"/>
7+
<mxCell id="16" style="edgeStyle=none;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;endArrow=none;endFill=0;startArrow=classic;startFill=1;" edge="1" parent="1" target="10">
8+
<mxGeometry relative="1" as="geometry">
9+
<mxPoint x="330" y="80" as="sourcePoint"/>
10+
</mxGeometry>
11+
</mxCell>
12+
<mxCell id="26" style="edgeStyle=none;shape=flexArrow;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.25;entryY=0;entryDx=0;entryDy=0;startArrow=none;startFill=0;endArrow=block;endFill=0;" edge="1" parent="1" target="20">
13+
<mxGeometry relative="1" as="geometry">
14+
<mxPoint x="384.5" y="130" as="sourcePoint"/>
15+
</mxGeometry>
16+
</mxCell>
17+
<mxCell id="17" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;startArrow=classic;startFill=1;endArrow=none;endFill=0;" edge="1" parent="1" target="11">
18+
<mxGeometry relative="1" as="geometry">
19+
<mxPoint x="579.3199999999999" y="80" as="sourcePoint"/>
20+
</mxGeometry>
21+
</mxCell>
22+
<mxCell id="23" style="edgeStyle=none;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;startArrow=classic;startFill=1;endArrow=none;endFill=0;" edge="1" parent="1" target="20">
23+
<mxGeometry relative="1" as="geometry">
24+
<mxPoint x="470" y="80" as="sourcePoint"/>
25+
</mxGeometry>
26+
</mxCell>
27+
<mxCell id="28" style="edgeStyle=none;shape=arrow;html=1;exitX=0.75;exitY=1;exitDx=0;exitDy=0;entryX=0.75;entryY=0;entryDx=0;entryDy=0;startArrow=classic;startFill=1;endArrow=none;endFill=0;strokeWidth=1;" edge="1" parent="1" target="20">
28+
<mxGeometry relative="1" as="geometry">
29+
<mxPoint x="551.99" y="130" as="sourcePoint"/>
30+
<Array as="points">
31+
<mxPoint x="530" y="170"/>
32+
</Array>
33+
</mxGeometry>
34+
</mxCell>
35+
<mxCell id="10" value="" style="sketch=0;outlineConnect=0;fontColor=#232F3E;gradientColor=none;fillColor=#3F8624;strokeColor=none;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=12;fontStyle=0;aspect=fixed;pointerEvents=1;shape=mxgraph.aws4.iot_thing_temperature_sensor;" vertex="1" parent="1">
36+
<mxGeometry x="204" y="120" width="78" height="78" as="geometry"/>
37+
</mxCell>
38+
<mxCell id="11" value="" style="sketch=0;outlineConnect=0;fontColor=#232F3E;gradientColor=none;fillColor=#3F8624;strokeColor=none;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=12;fontStyle=0;aspect=fixed;pointerEvents=1;shape=mxgraph.aws4.iot_thing_temperature_sensor;" vertex="1" parent="1">
39+
<mxGeometry x="630" y="120" width="78" height="78" as="geometry"/>
40+
</mxCell>
41+
<mxCell id="14" value="Temperature Sensor" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
42+
<mxGeometry x="180" y="198" width="130" height="30" as="geometry"/>
43+
</mxCell>
44+
<mxCell id="15" value="Temperature Sensor" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
45+
<mxGeometry x="604" y="198" width="130" height="30" as="geometry"/>
46+
</mxCell>
47+
<mxCell id="18" value="write to &lt;br&gt;event stream" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
48+
<mxGeometry x="610" y="75" width="90" height="40" as="geometry"/>
49+
</mxCell>
50+
<mxCell id="19" value="write to&amp;nbsp;&lt;br&gt;event stream" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
51+
<mxGeometry x="215" y="70" width="90" height="40" as="geometry"/>
52+
</mxCell>
53+
<mxCell id="21" style="edgeStyle=none;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.915;entryY=0.5;entryDx=0;entryDy=0;entryPerimeter=0;startArrow=none;startFill=0;endArrow=classic;endFill=1;" edge="1" parent="1" source="20">
54+
<mxGeometry relative="1" as="geometry">
55+
<mxPoint x="429.7349999999999" y="80" as="targetPoint"/>
56+
</mxGeometry>
57+
</mxCell>
58+
<mxCell id="40" style="edgeStyle=none;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;strokeWidth=1;startArrow=classic;startFill=1;endArrow=none;endFill=0;" edge="1" parent="1" source="20" target="35">
59+
<mxGeometry relative="1" as="geometry"/>
60+
</mxCell>
61+
<mxCell id="20" value="Solid Stream &lt;br&gt;Notifications Cache" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
62+
<mxGeometry x="371" y="210" width="190" height="70" as="geometry"/>
63+
</mxCell>
64+
<mxCell id="24" value="subscribes notiif." style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
65+
<mxGeometry x="411" y="115" width="110" height="30" as="geometry"/>
66+
</mxCell>
67+
<mxCell id="30" value="events" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
68+
<mxGeometry x="540" y="155" width="60" height="30" as="geometry"/>
69+
</mxCell>
70+
<mxCell id="31" value="events" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
71+
<mxGeometry x="340" y="155" width="60" height="30" as="geometry"/>
72+
</mxCell>
73+
<mxCell id="32" value="/pod1/" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
74+
<mxGeometry x="350" y="5" width="60" height="30" as="geometry"/>
75+
</mxCell>
76+
<mxCell id="33" value="/pod2/" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
77+
<mxGeometry x="490" y="5" width="60" height="30" as="geometry"/>
78+
</mxCell>
79+
<mxCell id="38" style="edgeStyle=none;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0.25;entryY=1;entryDx=0;entryDy=0;strokeWidth=1;startArrow=none;startFill=0;endArrow=classic;endFill=1;" edge="1" parent="1" source="34" target="20">
80+
<mxGeometry relative="1" as="geometry"/>
81+
</mxCell>
82+
<mxCell id="34" value="" style="sketch=0;aspect=fixed;pointerEvents=1;shadow=0;dashed=0;html=1;strokeColor=none;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;align=center;fillColor=#00188D;shape=mxgraph.mscae.enterprise.client_application" vertex="1" parent="1">
83+
<mxGeometry x="220" y="390" width="90" height="57.6" as="geometry"/>
84+
</mxCell>
85+
<mxCell id="35" value="" style="sketch=0;outlineConnect=0;fontColor=#232F3E;gradientColor=none;fillColor=#232F3D;strokeColor=none;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=12;fontStyle=0;aspect=fixed;pointerEvents=1;shape=mxgraph.aws4.mobile_client;" vertex="1" parent="1">
86+
<mxGeometry x="429" y="381.91" width="41" height="78" as="geometry"/>
87+
</mxCell>
88+
<mxCell id="42" style="edgeStyle=none;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.75;entryY=1;entryDx=0;entryDy=0;strokeWidth=1;startArrow=none;startFill=0;endArrow=classic;endFill=1;" edge="1" parent="1" source="36" target="20">
89+
<mxGeometry relative="1" as="geometry"/>
90+
</mxCell>
91+
<mxCell id="36" value="" style="aspect=fixed;perimeter=ellipsePerimeter;html=1;align=center;shadow=0;dashed=0;spacingTop=3;image;image=img/lib/active_directory/laptop_client.svg;" vertex="1" parent="1">
92+
<mxGeometry x="561" y="381.91" width="74" height="82.22" as="geometry"/>
93+
</mxCell>
94+
<mxCell id="37" value="&lt;font style=&quot;font-size: 14px;&quot;&gt;(more clients scaling up to 100k)&lt;/font&gt;" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
95+
<mxGeometry x="635" y="351.90999999999997" width="230" height="30" as="geometry"/>
96+
</mxCell>
97+
<mxCell id="39" value="subscribe notif for /pod1/" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
98+
<mxGeometry x="180" y="462.02" width="150" height="30" as="geometry"/>
99+
</mxCell>
100+
<mxCell id="41" value="&lt;span style=&quot;color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: center; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(251, 251, 251); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;&quot;&gt;subscribe notif for /pod2/&lt;/span&gt;" style="text;whiteSpace=wrap;html=1;" vertex="1" parent="1">
101+
<mxGeometry x="380" y="470" width="150" height="30" as="geometry"/>
102+
</mxCell>
103+
<mxCell id="43" value="&lt;span style=&quot;color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: center; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(251, 251, 251); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;&quot;&gt;subscribe notif for /pod1/ and /pod2/&lt;/span&gt;" style="text;whiteSpace=wrap;html=1;" vertex="1" parent="1">
104+
<mxGeometry x="550" y="470" width="210" height="40" as="geometry"/>
105+
</mxCell>
106+
<mxCell id="44" value="Pod" style="shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;fontSize=14;" vertex="1" parent="1">
107+
<mxGeometry x="335" y="45" width="90" height="65" as="geometry"/>
108+
</mxCell>
109+
<mxCell id="45" value="Pod" style="shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;fontSize=14;" vertex="1" parent="1">
110+
<mxGeometry x="475" y="50" width="90" height="65" as="geometry"/>
111+
</mxCell>
112+
</root>
113+
</mxGraphModel>
114+
</diagram>
115+
</mxfile>

architecture.png

62.5 KB
Loading

src/index.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +0,0 @@
1-
function sum(a:number, b:number) {
2-
return a + b;
3-
}
4-
module.exports = {sum};

0 commit comments

Comments
 (0)