Re: XPC Question

Sandor Szatmari

On Sep 18, 2018, at 12:46, Jens Alfke <jens@...> wrote:

On Sep 18, 2018, at 4:00 AM, Sandor Szatmari <> wrote:

Can you do XPC RPC over an IP connection?  Or, in other words… Can you do XPC between two computers?

Jens, thanks for your input.
Not as far as I know.

In general, it’s a bad idea to use this sort of “hidden” RPC across a network. Networking is fundamentally unlike local function calls, and making a network call look exactly like a method call hides those differences and makes it easy to run into problems handling failures, dealing with protocol changes, enforcing security, and more.

Unfortunately Apple doesn’t have any good frameworks for implementing messaging between computers, especially on the listener (“server”) end. The best general purpose protocol right now is probably WebSockets, but there’s still no support for it in Apple’s frameworks, and it’s not easy to implement yourself.

We have several in house apps using DO over the LAN (in a 10.12 environment, in deployment since 10.5 or 10.4 if not earlier) and aside from security concerns for public use it has been great for implementing RPC.  We’ve had these services running for many years and they have been very stable.  As long as you know the demarcation between local and remote, things go smoothly. 

I am looking to implement some new functionality and wanted to make sure there was nothing I was overlooking.  I don’t think I’ll use DO as I’d like to not continue a dependency on outdated technology.  I would prefer to not have to implement my own protocol at a low level.

Any higher level options you can suggest would be appreciated.  The scenario is a launchd daemon running on multiple machines that can be controlled by a console app.  Send commands from the console app to the daemons, read statuses from the daemons.




Join { to automatically receive all group messages.