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

Atuin Daemon improvements #2008

Open
2 tasks
ellie opened this issue May 8, 2024 · 3 comments
Open
2 tasks

Atuin Daemon improvements #2008

ellie opened this issue May 8, 2024 · 3 comments

Comments

@ellie
Copy link
Member

ellie commented May 8, 2024

While the daemon has now been merged, as of #2006, there are a few things left to improve it

  • Cleanup logging, it's a bit of a mess and has leftovers from when sync was more interactive
  • Support automatically installing some service or startup script
@Nemo157
Copy link
Contributor

Nemo157 commented May 22, 2024

Couple things I noticed trying it out:

  • The default socket path should be in $XDG_RUNTIME_DIR not $XDG_DATA_HOME, for security and to avoid issues around networked home dirs.
  • It'd be nice to support systemd socket-activation to avoid problems with race conditions between service startup and initial connections, that essentially means integrating an option to use listenfd instead of taking a path. It's complicated slightly because the client will still need to have the path specified for where to connect to.

@Nemo157
Copy link
Contributor

Nemo157 commented May 30, 2024

Are there any plans to integrate other functionality into the daemon? I've noticed rarely sometimes auto-completion is delayed, I presume it's something similar to #2042 where the sqlite database is locked by the daemon for a while because of #952, so the client trying to search the history for autocompletion gets blocked. If history queries were also proxied through to the daemon that would avoid this issue. I also assume setting up the daemon connection should be faster than opening the database so that might even reduce the latency slightly.

@ellie
Copy link
Member Author

ellie commented May 30, 2024

Potentially other functionality yes, but not that I'm afraid. The database is only locked for the duration of the write transaction, which generally should not be more than single digit ms.

That sort of functionality is only beneficial for users of ZFS (and maybe btrfs, though I don't know of many people using that), and there's only so much complexity I'm willing to add to workaround the poor interaction of ZFS/SQLite.

Realistically the serialization/"network call"/grpc server steps would lead to a slight decrease in performance for everybody else, vs making a sqlite query to an embedded database.

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

No branches or pull requests

2 participants