Skip to content

Commit e520dd7

Browse files
committed
Update documentation.
1 parent d53ddf4 commit e520dd7

4 files changed

Lines changed: 118 additions & 10 deletions

File tree

README.md

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,20 @@ The framework offers a flexible configuration system, allowing users to customiz
7575
**Logging and Monitoring:**
7676
Comprehensive logging and monitoring capabilities are integrated into the framework, providing real-time insights into the network activity and performance metrics. This aids in troubleshooting and maintaining the health of the system.
7777

78+
**File Streaming and Transfer:**
79+
ChaskiStreamer includes helpers to send files in chunks through the network using `push_file` and to accept incoming files when `allow_incoming_files` is enabled. This facilitates distributing large payloads without blocking the event loop.
80+
81+
**Persistent Storage:**
82+
Nodes can store key/value pairs using an SQLite-backed `PersistentStorage`. Data can be requested or served to peers with the `ChaskiStorageRequest` message type.
83+
84+
**Synchronous Interface:**
85+
`ChaskiStreamerSync` wraps the asynchronous streamer in a dedicated thread, offering a blocking API that integrates with traditional synchronous code bases.
86+
87+
**Celery Integration:**
88+
The package ships with a custom Kombu transport (`chaski.utils.transport`) so Chaski can act as a Celery broker or backend.
89+
90+
**Message Pool with TTL:**
91+
Each node keeps a bounded pool of recently processed messages. This avoids processing duplicates and provides a configurable time-to-live for cached entries.
7892

7993
## Chaski-Confluent components
8094

@@ -83,21 +97,29 @@ Comprehensive logging and monitoring capabilities are integrated into the framew
8397
The Chaski_ Node is an essential component of the Chaski-Confluent system. It is responsible for initiating and managing
8498
network communication between distributed nodes. This class handles functions such as connection establishment,
8599
message passing, node discovery, and pairing based on shared subscriptions.
100+
Nodes keep track of their connections as "edges" where latency information and
101+
subscription data are stored. Each node can propagate received messages to its
102+
peers and caches recent messages in a bounded pool to avoid processing
86103

87104
### Chaski Streamer
88105

89106
The Chaski-Streamer extends the functionality of Chaski-Node by introducing asynchronous message streaming capabilities.
90107
It sets up an internal message queue to manage incoming messages, allowing efficient and scalable message processing within a distributed environment.
91108
The ChaskiStreamer can enter an asynchronous context, enabling the user to stream messages using the `async with` statement.
92-
This allows for handling messages dynamically as they arrive, enhancing the responsiveness and flexibility of the system.
109+
This allows for handling messages dynamically as they arrive, enhancing the
110+
responsiveness and flexibility of the system. The streamer also supports
111+
chunked file transfer via `push_file` and can store temporary results in a
112+
`PersistentStorage` database. When synchronous behaviour is required,
113+
`ChaskiStreamerSync` exposes the same API from a background thread.
93114

94115
### Chaski Remote
95116

96117
The Chaski-Remote class enhances the Chaski-Node functionality by enabling remote method invocation and interaction
97118
across distributed nodes. It equips nodes with the ability to communicate transparently, invoking methods and accessing
98119
attributes on remote objects as if they were local. This is achieved by utilizing the Proxy class, which wraps around
99120
the remote objects and provides a clean interface for method calls and attribute access.
100-
121+
The remote node verifies module availability through a lightweight UDP check
122+
before the proxy is returned, ensuring that requested services are reachable.
101123

102124
## Asynchronous Communication Architecture
103125

@@ -127,3 +149,12 @@ The CA in Chaski-Confluent can generate, sign, and distribute SSL certificates,
127149
security layer. This ensures that all communication between nodes is encrypted and authenticated,
128150
significantly reducing the risk of data breaches or unauthorized access.
129151

152+
153+
## Celery Transport and CLI Utilities
154+
155+
Chaski includes a custom Kombu transport so it can be used as a Celery broker.
156+
The `ChaskiChannel` class relies on `ChaskiStreamerSync` to publish and consume
157+
tasks through the topic ``celery_tasks``. Several command line scripts under
158+
`chaski/scripts/` make it easy to start a streamer root, a remote proxy or a
159+
certificate authority from the shell.
160+

docs/source/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Documentation Overview
1010
:maxdepth: 2
1111
:name: mastertoc
1212

13-
notebooks/01-chaski_node.pct
14-
notebooks/02-chaski_streamer.ptc
13+
notebooks/01-chaski_node
14+
notebooks/02-chaski_streamer
1515
notebooks/03-chaski_remote.ptc
1616
notebooks/04-certification_authority
1717
notebooks/05-celery

docs/source/notebooks/readme.ipynb

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,22 @@
9393
"The framework offers a flexible configuration system, allowing users to customize various parameters such as timeouts, retry intervals, and buffer sizes. This adaptability helps in optimizing the performance according to specific requirements.\n",
9494
"\n",
9595
"**Logging and Monitoring:**\n",
96-
"Comprehensive logging and monitoring capabilities are integrated into the framework, providing real-time insights into the network activity and performance metrics. This aids in troubleshooting and maintaining the health of the system.\n"
96+
"Comprehensive logging and monitoring capabilities are integrated into the framework, providing real-time insights into the network activity and performance metrics. This aids in troubleshooting and maintaining the health of the system.\n",
97+
"\n",
98+
"**File Streaming and Transfer:**\n",
99+
"ChaskiStreamer includes helpers to send files in chunks through the network using `push_file` and to accept incoming files when `allow_incoming_files` is enabled. This facilitates distributing large payloads without blocking the event loop.\n",
100+
"\n",
101+
"**Persistent Storage:**\n",
102+
"Nodes can store key/value pairs using an SQLite-backed `PersistentStorage`. Data can be requested or served to peers with the `ChaskiStorageRequest` message type.\n",
103+
"\n",
104+
"**Synchronous Interface:**\n",
105+
"`ChaskiStreamerSync` wraps the asynchronous streamer in a dedicated thread, offering a blocking API that integrates with traditional synchronous code bases.\n",
106+
"\n",
107+
"**Celery Integration:**\n",
108+
"The package ships with a custom Kombu transport (`chaski.utils.transport`) so Chaski can act as a Celery broker or backend.\n",
109+
"\n",
110+
"**Message Pool with TTL:**\n",
111+
"Each node keeps a bounded pool of recently processed messages. This avoids processing duplicates and provides a configurable time-to-live for cached entries."
97112
]
98113
},
99114
{
@@ -108,20 +123,29 @@
108123
"The Chaski_ Node is an essential component of the Chaski-Confluent system. It is responsible for initiating and managing\n",
109124
"network communication between distributed nodes. This class handles functions such as connection establishment,\n",
110125
"message passing, node discovery, and pairing based on shared subscriptions.\n",
126+
"Nodes keep track of their connections as \"edges\" where latency information and\n",
127+
"subscription data are stored. Each node can propagate received messages to its\n",
128+
"peers and caches recent messages in a bounded pool to avoid processing\n",
111129
"\n",
112130
"### Chaski Streamer\n",
113131
"\n",
114132
"The Chaski-Streamer extends the functionality of Chaski-Node by introducing asynchronous message streaming capabilities.\n",
115133
"It sets up an internal message queue to manage incoming messages, allowing efficient and scalable message processing within a distributed environment.\n",
116134
"The ChaskiStreamer can enter an asynchronous context, enabling the user to stream messages using the `async with` statement.\n",
117-
"This allows for handling messages dynamically as they arrive, enhancing the responsiveness and flexibility of the system.\n",
135+
"This allows for handling messages dynamically as they arrive, enhancing the\n",
136+
"responsiveness and flexibility of the system. The streamer also supports\n",
137+
"chunked file transfer via `push_file` and can store temporary results in a\n",
138+
"`PersistentStorage` database. When synchronous behaviour is required,\n",
139+
"`ChaskiStreamerSync` exposes the same API from a background thread.\n",
118140
"\n",
119141
"### Chaski Remote\n",
120142
"\n",
121143
"The Chaski-Remote class enhances the Chaski-Node functionality by enabling remote method invocation and interaction\n",
122144
"across distributed nodes. It equips nodes with the ability to communicate transparently, invoking methods and accessing\n",
123145
"attributes on remote objects as if they were local. This is achieved by utilizing the Proxy class, which wraps around\n",
124-
"the remote objects and provides a clean interface for method calls and attribute access.\n"
146+
"the remote objects and provides a clean interface for method calls and attribute access.\n",
147+
"The remote node verifies module availability through a lightweight UDP check\n",
148+
"before the proxy is returned, ensuring that requested services are reachable."
125149
]
126150
},
127151
{
@@ -163,6 +187,20 @@
163187
"security layer. This ensures that all communication between nodes is encrypted and authenticated,\n",
164188
"significantly reducing the risk of data breaches or unauthorized access.\n"
165189
]
190+
},
191+
{
192+
"metadata": {},
193+
"cell_type": "markdown",
194+
"source": [
195+
"## Celery Transport and CLI Utilities\n",
196+
"\n",
197+
"Chaski includes a custom Kombu transport so it can be used as a Celery broker.\n",
198+
"The `ChaskiChannel` class relies on `ChaskiStreamerSync` to publish and consume\n",
199+
"tasks through the topic ``celery_tasks``. Several command line scripts under\n",
200+
"`chaski/scripts/` make it easy to start a streamer root, a remote proxy or a\n",
201+
"certificate authority from the shell.\n"
202+
],
203+
"id": "f866782a2808b6e8"
166204
}
167205
],
168206
"metadata": {

docs/source/notebooks/readme.rst

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,27 @@ capabilities are integrated into the framework, providing real-time
114114
insights into the network activity and performance metrics. This aids in
115115
troubleshooting and maintaining the health of the system.
116116

117+
**File Streaming and Transfer:** ChaskiStreamer includes helpers to send
118+
files in chunks through the network using ``push_file`` and to accept
119+
incoming files when ``allow_incoming_files`` is enabled. This
120+
facilitates distributing large payloads without blocking the event loop.
121+
122+
**Persistent Storage:** Nodes can store key/value pairs using an
123+
SQLite-backed ``PersistentStorage``. Data can be requested or served to
124+
peers with the ``ChaskiStorageRequest`` message type.
125+
126+
**Synchronous Interface:** ``ChaskiStreamerSync`` wraps the asynchronous
127+
streamer in a dedicated thread, offering a blocking API that integrates
128+
with traditional synchronous code bases.
129+
130+
**Celery Integration:** The package ships with a custom Kombu transport
131+
(``chaski.utils.transport``) so Chaski can act as a Celery broker or
132+
backend.
133+
134+
**Message Pool with TTL:** Each node keeps a bounded pool of recently
135+
processed messages. This avoids processing duplicates and provides a
136+
configurable time-to-live for cached entries.
137+
117138
Chaski-Confluent components
118139
---------------------------
119140

@@ -124,7 +145,10 @@ The Chaski\_ Node is an essential component of the Chaski-Confluent
124145
system. It is responsible for initiating and managing network
125146
communication between distributed nodes. This class handles functions
126147
such as connection establishment, message passing, node discovery, and
127-
pairing based on shared subscriptions.
148+
pairing based on shared subscriptions. Nodes keep track of their
149+
connections as “edges” where latency information and subscription data
150+
are stored. Each node can propagate received messages to its peers and
151+
caches recent messages in a bounded pool to avoid processing
128152

129153
Chaski Streamer
130154
~~~~~~~~~~~~~~~
@@ -136,7 +160,11 @@ and scalable message processing within a distributed environment. The
136160
ChaskiStreamer can enter an asynchronous context, enabling the user to
137161
stream messages using the ``async with`` statement. This allows for
138162
handling messages dynamically as they arrive, enhancing the
139-
responsiveness and flexibility of the system.
163+
responsiveness and flexibility of the system. The streamer also supports
164+
chunked file transfer via ``push_file`` and can store temporary results
165+
in a ``PersistentStorage`` database. When synchronous behaviour is
166+
required, ``ChaskiStreamerSync`` exposes the same API from a background
167+
thread.
140168

141169
Chaski Remote
142170
~~~~~~~~~~~~~
@@ -147,7 +175,9 @@ nodes. It equips nodes with the ability to communicate transparently,
147175
invoking methods and accessing attributes on remote objects as if they
148176
were local. This is achieved by utilizing the Proxy class, which wraps
149177
around the remote objects and provides a clean interface for method
150-
calls and attribute access.
178+
calls and attribute access. The remote node verifies module availability
179+
through a lightweight UDP check before the proxy is returned, ensuring
180+
that requested services are reachable.
151181

152182
Asynchronous Communication Architecture
153183
---------------------------------------
@@ -183,3 +213,12 @@ The CA in Chaski-Confluent can generate, sign, and distribute SSL
183213
certificates, providing a robust security layer. This ensures that all
184214
communication between nodes is encrypted and authenticated,
185215
significantly reducing the risk of data breaches or unauthorized access.
216+
217+
Celery Transport and CLI Utilities
218+
----------------------------------
219+
220+
Chaski includes a custom Kombu transport so it can be used as a Celery
221+
broker. The ``ChaskiChannel`` class relies on ``ChaskiStreamerSync`` to
222+
publish and consume tasks through the topic ``celery_tasks``. Several
223+
command line scripts under ``chaski/scripts/`` make it easy to start a
224+
streamer root, a remote proxy or a certificate authority from the shell.

0 commit comments

Comments
 (0)