Pre-requisites:
- Erlang & Elixir installed
- Clone the project and you ready to go
Demo
- Start multiple nodes using
iex --sname <NAME> -S mix
e.giex --sname node1 -S mix
- Start greeting process from any node
# from node1 start a child process
Horde.DynamicSupervisor.start_child(MixApp1.DistributedSupervisor, {MixApp1.Greeting, "agent1"})
# or
MixApp1.Greeting.start("agent1")
# from node2
MixApp1.Greeting.say("agent1", "hello")
Node1 goes down:
- Kill node1
CTRL+C
- From node2 re-run
MixApp1.Greeting.say("agent1", "hello")
Node1 backup & Node2 go down:
- Start node1
iex --sname node1 -S mix
- Kill node2
CTRL+C
- From node1 run
MixApp1.Greeting.say("agent1", "hello")
delta_crdt_options: [sync_interval: 30]