Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Beam splitter #136

Closed
wants to merge 14 commits into from
Closed

[WIP] Beam splitter #136

wants to merge 14 commits into from

Conversation

cdegroot
Copy link
Contributor

@cdegroot cdegroot commented Feb 21, 2020

Work in progress. See eels/README.md for deets.

Should resolve #115

Basic structure is in place. Left todo:

  • I/O forwarding should be done in raw
  • Decide how to run/start debugger as well (currently hardcoding for language server)
  • Rewrite .sh/.bat scripts to start the Eels script
  • Actually send the Eels pid through all the calls so that a) code stuff is executed in the correct node, and b) responses are sent to the correct node
  • Clean up old style startup code (CLI main, etc)

@axelson
Copy link
Member

axelson commented Feb 22, 2020

@cdegroot thanks for taking a stab at this! Having some code is very useful for discussions.

I'm not quite sure how well this will work for a request that flows all the way through the system. Specifically what changes will be needed in ElixirSense if ElixirSense is no longer running on the same beam node as the source code it is analyzing. Passing the Eels pid through to ElixirSense seems quite invasive, could we instead change ElixirSense to understand how to call Eels directly?

I'm also worried about ElixirLS.Utils.EelsServer and Eels.LSClient becoming bottlenecks.

I don't think having multiple versions of the Eels node, and only a single Language Server will work well because the Language Server code keeps a lot of it's own state and that state would interfere between projects.

I think the general approach of two separate BEAM nodes, one for the source code and a small helper and one for the full Language Server is a good one, but it remains to be seen how to best facilitate communication between them. I'm also not sure about the tradeoffs between Eels starting ElixirLS versus the other way around. One benefit of the Language Server starting the Eels node, is that then we don't need to forward all the LSP stdin/stdout between the nodes.

@cdegroot
Copy link
Contributor Author

One of the things I wanted to try with the "flipped" approach is to have a minimal amount of VMs running - this will start 1+n BEAM instances for having n projects open, while having the language server control a version-specific BEAM would mean that you end up with 2n instances. But yes, it does introduce some complexities. More than happy to accept your assessment of these complexities and flip the thing, it shouldn't actually be very hard to do.

@lukaszsamson
Copy link
Collaborator

Closing as this got stale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Discussion: Change packaging approach
3 participants