https://github.com/mgwidmann/hot_potato
Elixir implementation of hot potato across any number of nodes
https://github.com/mgwidmann/hot_potato
Last synced: 11 months ago
JSON representation
Elixir implementation of hot potato across any number of nodes
- Host: GitHub
- URL: https://github.com/mgwidmann/hot_potato
- Owner: mgwidmann
- Created: 2014-07-18T04:54:03.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-11-09T00:41:33.000Z (over 11 years ago)
- Last Synced: 2024-12-31T17:20:10.668Z (over 1 year ago)
- Language: Elixir
- Size: 133 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Hot Potato
==========
Run in three or more (minimum 2) terminals with different names:
$ iex --name w1@127.0.0.1 -S mix
$ iex --name w2@127.0.0.1 -S mix
$ iex --name w3@127.0.0.1 -S mix
In each terminal, import the module and connect to other nodes:
iex> import HotPotato.PotatoWorker; Node.connect :"w1@127.0.0.1"
In any terminal, tell the leader to start the hot potato!
iex> start
Be sure to replace `localhost` with the IP address or host name of the node in the cluster. Also, make sure to supply unique names within the entire cluster or the application will fail to start.