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

Middleware to clone & eval in a single command #20

Closed
tonsky opened this issue Oct 25, 2021 · 3 comments · Fixed by #48
Closed

Middleware to clone & eval in a single command #20

tonsky opened this issue Oct 25, 2021 · 3 comments · Fixed by #48

Comments

@tonsky
Copy link
Owner

tonsky commented Oct 25, 2021

Reduces network latency and change of errors

@jaihindhreddy
Copy link
Contributor

If the intent of this is only to avoid the additional network roundtrip, then we can simply use nREPL's ephemeral sessions to do the job. This approach is implemented by #48. That being said, I did implement the other approach suggested by the literal text of the issue i.e, implementing a clone-and-eval middleware. This is implemented by #49.

Using Ephemeral sessions has a couple of advantages IMO:

  1. Less code to make it happen (using the existing Ephemeral sessions code already provided by nREPL)
  2. The one-off sessions are cleaned up (closed). Currently, an unbounded number of threads are created in the nREPL server. This could be addresses by closing the session ourselves, but the code currently does not do this (discussed separately in Unbounded number of threads in nREPL server #50).

WDYT?

@tonsky
Copy link
Owner Author

tonsky commented Dec 23, 2021

Thanks! I’ll take a look after the holidays

@jaihindhreddy
Copy link
Contributor

Of course! Have fun!

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