Search code examples
serviceclientdbus

Can a process be both service provider and client on D-Bus


I know typically a process is either a service provider or client over D-Bus, is it practically possible that a process be both a service and client (I think it's okay)? I have such needs in my project, originally there is a service provider and client, some requirements come in, I need the original client to provide service as well. Is there any downside if it's theoretically doable?


Solution

  • Yes, it’s possible, straightforward to do, and there are no downsides as long as it’s a suitable architecture for the problem you’re trying to solve.

    Many system services already do just this: they expose a system service on the bus, and also act as a client with other system services which provide information to them.