diff --git a/crates/lavina-core/src/clustering.rs b/crates/lavina-core/src/clustering.rs index d264906..9fffcaf 100644 --- a/crates/lavina-core/src/clustering.rs +++ b/crates/lavina-core/src/clustering.rs @@ -6,6 +6,8 @@ use serde::{Deserialize, Serialize}; use std::net::SocketAddr; use std::sync::Arc; +mod broadcast; + type Addresses = Vec; #[derive(Deserialize, Debug, Clone)] diff --git a/crates/lavina-core/src/clustering/broadcast.rs b/crates/lavina-core/src/clustering/broadcast.rs new file mode 100644 index 0000000..190698f --- /dev/null +++ b/crates/lavina-core/src/clustering/broadcast.rs @@ -0,0 +1,5 @@ +/// Receives updates from other nodes and broadcasts them to local player actors. +struct Broadcasting { + +} + diff --git a/docs/scalability.md b/docs/scalability.md index b33f26e..c2a31a3 100644 --- a/docs/scalability.md +++ b/docs/scalability.md @@ -16,6 +16,13 @@ Dialogs and their history are located on the same node, as all players. The allocation is specified statically in the configuration file. ## Step 2 – players and dialogs distributed +Different players could be located on different nodes. The traffic is still terminated on the same node. +A client must connect to the node which hosts the player, otherwise the connection is terminated. + +Dialogs are located on the first player's node. This depends on how the first player is decided, +which is implemented by sorting the players lexicographically. + +The allocation is still specified statically in the configuration file. ## Step 3 – dynamic allocation and consensus