evoid-cluster
Multi-node clustering — Intent Handler system
Quick Start • Intent Handler • Architecture • API
Quick Start
uv add evoid-cluster
Method 1: Intent Handler (Recommended)
from evoid_cluster import register_handlers
# Register cluster as Intent handlers
register_handlers(config={
"node": {"id": "node-1", "host": "0.0.0.0", "port": 9100},
"cluster": {"secret": "my-secret"},
})
Method 2: Direct API
from evoid_cluster import ClusterBridge, ClusterConfig
config = ClusterConfig.from_toml("cluster.toml")
bridge = ClusterBridge(config)
Intent Handler
evoid-cluster registers inter-node communication as Intent handlers.
Architecture
Node A (users) ←──WebSocket──→ Node B (chat)
↕ ↕
Node C (database) ←──WebSocket──→ Node D (game)
Each node:
- Announces its services via Intent through the message bus
- ClusterBridge forwards intents to remote nodes
- Only Intent and Result flow between nodes — never raw data
Configuration
TOML (separate file)
[node]
id = "node-1"
host = "0.0.0.0"
port = 9100
[cluster]
secret = "my-cluster-secret"
[cluster.peers]
"node-b" = { host = "192.168.1.11", port = 9100 }
API
register_handlers(config: dict)
Register cluster as Intent handlers.
ClusterBridge Methods
| Method | Signature | Description |
|---|---|---|
start |
async start() |
Start cluster node |
stop |
async stop() |
Stop cluster node |
broadcast |
async broadcast(intent) |
Send intent to all peers |
DI Integration
Cluster connects its registry to evoid-di, making remote services available as fallbacks:
from evoid_di import di
from evoid_cluster import ClusterBridge
bridge = ClusterBridge(config)
await bridge.start()
# Remote services become available via DI:
di.set_cluster_registry(bridge._registry)
storage = di.resolve("storage.postgresql") # checks peers if not local
Dependencies
evoid>=0.4.0websockets>=12.0
Links
License
MIT
Metadata
Release files for evoid-cluster 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| evoid_cluster-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for evoid_cluster-0.2.0-py3-none-any.whl |
Release files / evoid_cluster-0.2.0-py3-none-any.whl
| Download URL | evoid_cluster-0.2.0-py3-none-any.whl |
|---|---|
| Size | 16.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5711378c35fb505ba8a1fd7d65675f11dc2aab506aed265509b7385571fcceaa
|
|
BLAKE2b-256 checksum How to use checksums |
c6a1859f4b52e8406717da3b97c22e0997410cf5e1d83e77e0dfb651c734b914
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for evoid-cluster 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.