Skip to content

fastcache-compile-node: a daemon shell, so a worker can install itself as a service #79

Description

@christianparpart

fastcache-compile-node is configured entirely from argv and cannot install itself as a service. On Linux that is covered in practice — the packaged socket-activated unit is installed, enabled by the deb/rpm scriptlets and asserted in CI — but on macOS and Windows an operator has to run the worker in the foreground or wire up a supervisor by hand.

What the daemon already has and the worker does not:

  • IDaemonHost (ForegroundHost / PosixDaemonHost / WindowsServiceHost). src/apps/fastcache-compile-node/main.cpp includes Platform/DaemonControls.hpp and installs signal handlers, but never reaches for the host seam.
  • --install-service / --uninstall-service. InstallService/UninstallService (src/FastCache/Platform/ServiceControl.hpp) take Config const& — the daemon's config type — so they cannot serve a second binary without a descriptor seam between them. That seam is the ServiceSpec the PR Add distributed compilation: dispatch cache misses to worker nodes #78 description named; it has zero occurrences in the tree today.
  • A config file. DefaultConfigCandidates() (src/FastCache/Config/DefaultConfigPath.cpp) hardcodes fastcached.yaml in every row and takes no application name, so the worker has no discovered-config path to generalize onto.

Worth keeping in mind while doing it: BuildServiceArgv's exclusion list and its ServiceControl_test case exist because a flag that reaches a supervisor has to survive its own parser (see AGENT.md, "What reaches a supervisor must survive its own parser"). A worker registration would need the same treatment for --advertise, which under socket activation is required — a wrong one registers happily and then nobody can reach it.

Deferred from #78, which is otherwise complete; docs/tools/fastcache-compile-node.md records the gap under "Not yet done".

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/distributedDistributed/, apps/fastcache-compile-node/ - dispatch, workers, schedulerarea/platformPlatform/, Config/, Cli/ - service registration, config lookup, the CLI tabletype/featureNew capability, or a user-visible extension of one

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions