Skip to content
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.

Daemonized Lorri #65

Closed
grahamc opened this issue Apr 25, 2019 · 6 comments
Closed

Daemonized Lorri #65

grahamc opened this issue Apr 25, 2019 · 6 comments

Comments

@grahamc
Copy link
Contributor

grahamc commented Apr 25, 2019

Shea Profpatsch and I met a couple weeks ago and came up with some designs on how to setup a daemon.

Essentially what we came up was fairly simple:

  • Lorri's daemon will listen at a "well defined location" -- as defined by the XDG rules for XDG_RUNTIME_DIR
  • Entering direnv will look at this location for the socket, and if it isn't present or listening, spawn a new socket
  • Each time lorri's direnv hook is activated, it will send a ping to the daemon
  • The daemon will "time out" after a period and then exit
  • A single lorri daemon will cover many projects

We'll want to take care that one evaluation does not block another evaluation.

@infinisil
Copy link

What's the advantage of using one daemon for many projects instead of one for each?

@grahamc
Copy link
Contributor Author

grahamc commented Apr 25, 2019

That is certainly a question. That would eliminate the need for a well known socket location, and would simplify blocking evaluations.

Having a single daemon means fewer watches when paths overlap, but not sure that is a significant benefit.

@shlevy, @Profpatsch?

@shlevy
Copy link

shlevy commented Apr 29, 2019

The main advantage is that many more service mangaement setups will support a single service than those that support multiple parameterized services, and you can start it once at login instead of having to start it once per project.

@colonelpanic8
Copy link
Contributor

This is done now, right?

@Profpatsch
Copy link
Collaborator

This is done now, right?

Everything except the timeout part, which is why I haven’t closed this issue yet.

@Profpatsch
Copy link
Collaborator

Closing in favor of #163. This is a nicely small-scoped issue, if anyone wants to give it a try.

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

No branches or pull requests

5 participants