Examples

Three coordination commands, one click at a time

Small simulations that run in your browser and print the reply Ruvio gives for each call. They do not connect to a server; timings are shortened so you can watch a window or a TTL run out.

Rate limit

LIMIT in one call

Five calls per 10 second window on one key. Each accepted call returns what is left; a full window returns a null reply and is not counted. The window is the key's deadline, so it resets by itself.

Rate limits use case

Locks

LEASE with a fencing token

Two workers compete for job:7. A grant returns a token that grows with every grant; while the lease is held the other worker gets a null reply. RELEASE only frees the lease when the token matches.

Locks use case

Concurrency

SEMAPHORE that heals itself

At most three holders, each with its own 6 second TTL. A worker that finishes calls RELEASE; a worker that crashes never does, and its slot frees when its TTL ends, so the others are never blocked for good.

Worker concurrency use case