Skip to content

Instantly share code, notes, and snippets.

View GaalDornick's full-sized avatar

Jayesh Lalwani GaalDornick

  • Amazon
  • Mclean Va
View GitHub Profile
@mgwidmann
mgwidmann / greeter.ex
Last active December 20, 2018 17:34
Simple distributed greeting system
# machine 1
# start up with `iex --name m1@127.0.0.1 --cookie greeter`
# This isn't really necessary but it won't hurt anything
Node.connect :"m1@127.0.0.1"
# All `Node.connect/1` calls can go to the same machine and every machine
# in the cluster will automatically be connected.
# machine 2
# start up with `iex --name m2@127.0.0.1 --cookie greeter`