OxL Reference

counter-cluster

Two roles (§12): edge serves the service Gate and runs a leader task, store keeps data in the replicated storage and hosts the sharded actor Counter.

sh
cd examples/counter-cluster
oxl dev --nodes 4
# in another terminal: tail -f <data-dir>/n0/stdout.log  or  oxl inspect

The log shows the counter growing (step 7: counter 7 = 7) and the actor being activated on the node that owns its shard (counter 7 activated on n3). Kill the process of one node: the state of the actor survives, it is replicated across the storage nodes. Details: the cluster tour.

Project files · Download (zip)