-
-
Save josevalim/073d630931a6f6624961 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ EPMD | |
- Distributed systems are cool | |
- Distributed systems are also complex | |
- First step: How to find other machines (and nodes) in the same network | |
- Erlang Port Mapper Daemon | |
+ EPMD in C | |
- Ships with Erlang | |
- is a TCP server | |
- usually 4369 | |
- binary protocol | |
- stateful | |
- replaceable | |
+ ExPMD | |
- EPMD written in Elixir | |
- Pattern matching on binary strings | |
- Still getting used with immutability | |
- Using agents to keep data | |
+ Requests () | |
- Alive -- Sent by new node on start-up | |
Registers named node and port (etc) on local EPMD | |
Connection remains open until node exits. | |
- Port -- Receives a node name | |
Returns port registered with given name | |
- Names -- return list of all registered names/ports | |
- wireshark | |
+ Live demo | |
- iex --name sophia (alive) | |
- Node.ping(:"jv@jv.hackerschool.com") | |
- finds EPMD at jv.hackerschool.com | |
- asks for node named jv | |
- :net_adm.names() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment