Skip to content

Conversation

doorgan
Copy link
Collaborator

@doorgan doorgan commented Oct 15, 2025

Closes #108
Should fix #59

Removes the usage of EPMD, and instead uses a custom EPMD module that provides an epmd port that project nodes use to connect to the manager node directly, instead of relying on epmd to resolve the names to ports.

There is one caveat to this implementation: while it works fairly well, we're still using the ETS search store, which implements a WAL that only supports writes from a single node. We're currently relying on EPMD to let other project nodes discover who is the current wal leader so we can ensure there is always a single writer for the WAL. With this change, we can end up with multiple writers if you open the same project with multiple editors which can lead to issues. I didn't observe problems so far in my tests with multiple editors but it's still something that needs to be changed.

There are two ways to solve that problem: switch to sqlite(we've been wanting to do this for a while), or do something similar to what livebook does to discover the runtime nodes.

@impl true
def handle_call({:start, paths}, from, %State{} = state) do
:ok = :net_kernel.monitor_nodes(true, node_type: :visible)
:ok = :net_kernel.monitor_nodes(true, node_type: :all)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this setup project nodes are :hidden

@mhanberg
Copy link
Member

I works on my work computer where I got the no_connection error

@doorgan doorgan merged commit 9cfb5cc into main Oct 16, 2025
123 of 127 checks passed
@doorgan doorgan deleted the doorgan/epmdless branch October 16, 2025 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Don't use EPMD. Error using LSP: Erlang error: {:erpc, :noconnection}

2 participants