ergo-services / ergo

An actor-based Framework with network transparency for creating event-driven architecture in Golang. Inspired by Erlang. Zero dependencies.
https://docs.ergo.services
MIT License
3.51k stars 138 forks source link

How to use ergo epmd instead of standard Erlang epmd? #56

Closed sleipnir closed 3 years ago

sleipnir commented 3 years ago

Hi, first of all I would like to congratulate you for the excellent project.

I would like to know if and how it would be possible to run the epmd you provide instead of the standard Erlang epmd. I would also like to know if there is any benchmark of you just doing the drop-in replacement of epmd using applications written purely in Erlang/Elixir.

Can you help me ?

halturin commented 3 years ago

Thanks a lot.

Ergo node has embedded epmd service. Here is how it works when the node is starting...

  1. try to start embedded empd service.
  2. if port is already taken by another process (Erlang's epmd or another Ergo node) it works as an epmd-client only.
  3. if embedded empd is started successfully (could have started to listen on the defined port) the Ergo node is using that one.
  4. if Ergo node lost connection with epmd (another Ergo node with started empd service went down or Erlang's empd was killed by some reason) - go to 1.

You may also want to use go get -u github.com/halturin/ergo/cmd/epmd as a standalone empd service, but I'm not sure if its worth it.

About benchmarking. EPMD has a very limited feature (port resolving) which doesn't affect performance at all. You will get significant improvements using Ergo Framework as a drop-in replacement (https://github.com/halturin/ergo#benchmarks)

halturin commented 3 years ago

moved to the discussion if you don't mind.