Cluster plugin for evoid — connect multiple nodes into a unified system
Project description
evoid-cluster
Multi-node clustering — Intent Handler system
Quick Start • Intent Handler • Architecture • API
Quick Start
pip install 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 |
Dependencies
evoid>=0.4.0websockets>=12.0
Links
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file evoid_cluster-0.1.0-py3-none-any.whl.
File metadata
- Download URL: evoid_cluster-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15a0c6539add9e3a48c1853946922e61b340e12c132bb087da30df3271d11bf2
|
|
| MD5 |
21a1e966e686c027be3690e46c79d91d
|
|
| BLAKE2b-256 |
1dd672b3f5813a8dd3da256d722067174ae3aa4a9f339967d019fd162e220fc2
|