Skip to content

Conversation

@RagnarGrootKoerkamp
Copy link
Collaborator

@RagnarGrootKoerkamp RagnarGrootKoerkamp commented Sep 18, 2025

Inspired by #41, but more minimalistic, this add a small deacon server mode that opens a unix socket in its working directory.

Then running more commands like deacond --use-server filter ... will forward all arguments to the server, which will process them.

Does not support networking, nor stdin/stdout (TODO add some checks for this?), since all IO is done by the server.

As said before, main benefit here is that you don't have to wait for the index to load on each invocation.

Limitations:

  • you'll have to clean up the deacon_server_socket file manually between runs
  • for now each server only supports a single index. Should be fine anyway.

Maybe we should restrict the commands sent to the server to only Filter? All index construction/modification commands aren't cached anyway.

TODO: pass the -t THREADS flag to the server invocation and use that instead of whatever the first client passed.

@bede bede merged commit dee0a58 into bede:main Sep 26, 2025
1 check passed
@bede
Copy link
Owner

bede commented Sep 26, 2025

Merged, need to add some tests for this later

@RagnarGrootKoerkamp RagnarGrootKoerkamp deleted the unix_socket_server branch September 26, 2025 15:10
@RagnarGrootKoerkamp
Copy link
Collaborator Author

RagnarGrootKoerkamp commented Sep 26, 2025

Ah there's also still a TODO in the first post here that would be nice to fix.

(Fixed in #50)

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.

2 participants