Asopitech With · Voice and chat communities
Discord presence with Alopex Chirps
Discord presence is the feature of Discord, the voice and chat community app, that shows whether friends and members are online right now. What if we rebuilt it by applying Alopex Chirps?
Updated: Oct 13, 2026
What the service does
In Discord, a status such as online, idle, do not disturb or offline appears next to each user’s name. When the status of a friend or a server member changes, it shows on the other person’s screen right away. The data is each user’s status and who is watching it.
How the communication is built
- Node membership: the servers that hold user connections join the mesh as nodes. Through gossip, every node knows which nodes are running.
- Status delivery: when a user’s status changes, it is sent to the nodes where the people watching that user are connected. With many destinations, broadcast to all nodes is used. Status notices that may go stale are sent on the ephemeral delivery profile.
- Node departure: when a node stops, a leave event arrives. Users connected to that node can be marked offline at once.
Which user is connected to which node, and who watches whose status, are kept by the application.
Deployment
Chirps is embedded in each node of the servers that hold connections. A new node only needs to join from the seed list, and the other nodes learn about it.
Why Alopex Chirps fits
Delivering online status comes down to fast notification between nodes and detecting when a node stops. Chirps has sends, broadcast and gossip failure detection in the same library.
See it in code
A hybrid logical clock gives a consistent order to status changes across nodes. Just the core (Rust).
use alopex_chirps_gossip_swim::hlc::{Clock, LocalHlc};
use std::sync::atomic::{AtomicU64, Ordering};
use std::sync::Arc;
use std::time::Duration;
// 説明用の手動クロック(実際はシステム時計)
struct ManualClock(AtomicU64);
impl Clock for ManualClock {
fn now_millis(&self) -> u64 {
self.0.load(Ordering::SeqCst)
}
}
fn main() {
let skew = Duration::from_secs(1);
// 接続を受ける 2 つのノード A / B。それぞれ論理時計を持つ
let mut a = LocalHlc::with_clock(skew, Arc::new(ManualClock(AtomicU64::new(100))));
let mut b = LocalHlc::with_clock(skew, Arc::new(ManualClock(AtomicU64::new(90))));
// A 側で状態の変化(オンライン→退席)が起きるたびに時計を進める
let online = a.tick();
let away = a.tick();
println!("A: online={online:?} away={away:?}");
// A の変化を B が受け取ると、B の時計は A を追い越す
let seen = b.receive(away).expect("receive");
println!("B receives A: {seen:?}");
// その後 B 側で起きた変化は、必ず A の変化より後に順序づく
let b_change = b.tick();
println!("B next: {b_change:?}");
assert!(b_change > away);
println!("OK: どのノードも、状態変化を同じ順序で解釈できる");
}The hybrid logical clock gives a consistent order to status changes across nodes, so the latest state agrees everywhere. Which nodes are alive (gossip membership) and delivery are handled by Chirps, as the prose describes.
Build online status delivery with Alopex Chirps, handling delivery between nodes and failure detection in one library. Start from the quickstart on GitHub.