Discussion:
XPC Question
Sandor Szatmari
2018-09-18 12:37:51 UTC
Permalink
Can you do XPC RPC over an IP connection? Or, in other words… Can you do XPC between two computers?

Thanks,
Sandor
_______________________________________________

Cocoa-dev mailing list (Cocoa-***@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/gegs%40ml-i
Alastair Houghton
2018-09-18 12:59:44 UTC
Permalink
Post by Sandor Szatmari
Can you do XPC RPC over an IP connection? Or, in other words… Can you do XPC between two computers?
Not as far as I’m aware. As far as I know, XPC is built on top of Mach messaging, which in theory can be used across the network but IIRC the version of Mach used in Darwin doesn’t support it.

Kind regards,

Alastair.

--
http://alastairs-place.net

_______________________________________________

Cocoa-dev mailing list (Cocoa-***@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/gegs%40ml-in.narkive.net

Th
Sandor Szatmari
2018-09-18 15:48:19 UTC
Permalink
Thanks Alistair!

Anyone else have additional info?

Sandor
Post by Alastair Houghton
Post by Sandor Szatmari
Can you do XPC RPC over an IP connection? Or, in other words… Can you do XPC between two computers?
Not as far as I’m aware. As far as I know, XPC is built on top of Mach messaging, which in theory can be used across the network but IIRC the version of Mach used in Darwin doesn’t support it.
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________

Cocoa-dev mailing list (Cocoa-***@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/gegs%40ml-in.narkive.net
Alastair Houghton
2018-09-18 17:25:40 UTC
Permalink
Post by Sandor Szatmari
Thanks Alistair!
Anyone else have additional info?
Well, Cocoa has Distributed Objects, which you could use for this purpose. DO has some interesting behaviour (in particular, watch out - it can throw exceptions, even when calling methods that don’t normally do so), but it does let you send messages to objects fairly easily over a network. There’s also Sun RPC (which uses the rpcgen tool, which you can find documented here: <https://docs.oracle.com/cd/E19683-01/816-1435/rpcgenpguide-24243/index.html>). Both of those are built-in to the macOS.

There are other options too, but they’ll be more work; for instance CORBA, DCE RPC (or indeed DCOM, which is based on it), SOAP, XML-RPC, or a Restful HTTP(S) interface. Or, indeed, a custom TCP-based server.

Exactly what you use depends on what’s best for your use case, which you don’t describe. In particular, cross-platform support is a major driver here; if you use DO, you probably won’t find it easy to talk to Windows or Linux machines if you ever need to in the future, and while Sun RPC is easy on most UNIX systems, Windows uses DCE RPC. CORBA is probably only of interest if you’re trying to talk to some enterprise system already built with it. SOAP, XML-RPC and Restful HTTP(S) are fairly general purpose and might be good choices if you ever wanted to talk to a server built with (say) Python or Ruby.

Anyway...

Kind regards,

Alastair.

--
http://alastairs-place.net

_______________________________________________

Cocoa-dev mailing list (Cocoa-***@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/gegs%40ml-in.narkive.net

This email sent to ***@ml-in.narkive
Sandor Szatmari
2018-09-18 20:37:28 UTC
Permalink
Alistair,
Post by Alastair Houghton
Post by Sandor Szatmari
Thanks Alistair!
Anyone else have additional info?
Well, Cocoa has Distributed Objects, which you could use for this purpose. DO has some interesting behaviour
Yes, we have several DO apps. We’ve used DO for 10+ years for LAN based peer to peer solution on in house apps. I am looking to implement some new functionality and wanted to stay away from deprecated technology if I can. So, I was looking at newer solutions so as to not reinvent the wheel. So it appears that XPC is only like interprocess DO, and is unable to do inter-machine RPC. Ok, thanks! And quite a nice breakdown of the RPC bone yard. Hearing CORBA takes me back down memory lane. :)

Thanks again for your time and thoughts!

Sandor
Post by Alastair Houghton
(in particular, watch out - it can throw exceptions, even when calling methods that don’t normally do so), but it does let you send messages to objects fairly easily over a network. There’s also Sun RPC (which uses the rpcgen tool, which you can find documented here: <https://docs.oracle.com/cd/E19683-01/816-1435/rpcgenpguide-24243/index.html>). Both of those are built-in to the macOS.
There are other options too, but they’ll be more work; for instance CORBA, DCE RPC (or indeed DCOM, which is based on it), SOAP, XML-RPC, or a Restful HTTP(S) interface. Or, indeed, a custom TCP-based server.
Exactly what you use depends on what’s best for your use case, which you don’t describe. In particular, cross-platform support is a major driver here; if you use DO, you probably won’t find it easy to talk to Windows or Linux machines if you ever need to in the future, and while Sun RPC is easy on most UNIX systems, Windows uses DCE RPC. CORBA is probably only of interest if you’re trying to talk to some enterprise system already built with it. SOAP, XML-RPC and Restful HTTP(S) are fairly general purpose and might be good choices if you ever wanted to talk to a server built with (say) Python or Ruby.
Anyway...
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________

Cocoa-dev mailing list (Cocoa-***@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/gegs%40ml-in.narkive.net

This email sent to g
Uli Kusterer
2018-10-23 06:56:15 UTC
Permalink
Post by Alastair Houghton
Well, Cocoa has Distributed Objects, which you could use for this purpose. DO has some interesting behaviour (in particular, watch out - it can throw exceptions, even when calling methods that don’t normally do so), but it does let you send messages to objects fairly easily over a network.
From what I remember, DO also has some very ... interesting behaviour when it comes to time-outs, and predictable timing, as well as dropped connections. Basically, it mostly assumes a stable, near-instant network, and there's no good way to recover from a dropped network, and no control over how long it will take to recover from stalls etc. either.

In short, DO is intended for small LANs, so if you're planning to use it over the internet ... don't.

If you need a fairly painless way for network communication, I'd suggest creating your own mechanism on top of queues of message objects and keyed, or better secure, archiving. You can always model things after XPC, with the same method names etc.

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de

_______________________________________________

Cocoa-dev mailing list (Cocoa-***@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/gegs%40ml-in.narkive.net

This ema
Sandor Szatmari
2018-10-23 11:54:48 UTC
Permalink
Post by Uli Kusterer
Post by Alastair Houghton
Well, Cocoa has Distributed Objects, which you could use for this purpose. DO has some interesting behaviour (in particular, watch out - it can throw exceptions, even when calling methods that don’t normally do so), but it does let you send messages to objects fairly easily over a network.
From what I remember, DO also has some very ... interesting behaviour when it comes to time-outs, and predictable timing, as well as dropped connections. Basically, it mostly assumes a stable, near-instant network, and there's no good way to recover from a dropped network, and no control over how long it will take to recover from stalls etc. either.
In short, DO is intended for small LANs, so if you're planning to use it over the internet ... don't.
Thanks, yes, I agree. DO should only be considered for LAN operations. Apt descriptions of its limitations and implementation restrictions. We have had several 24/7 systems running, synchronized via DO since forever. It is very reliable when done right. If not, it can be a mess.
Post by Uli Kusterer
If you need a fairly painless way for network communication, I'd suggest creating your own mechanism on top of queues of message objects and keyed, or better secure, archiving. You can always model things after XPC, with the same method names etc.
This will, again, be for a controlled environment (local LAN). Not sure what direction I’ll go at this point, but at least with the feedback I’ve gotten I can design something knowing I am not overlooking a newly introduced macOS native inter-machine RPC technology.

Thanks for your thoughts,
Sandor
Post by Uli Kusterer
Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________

Cocoa-dev mailing list (Cocoa-***@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/gegs%40ml-in.

Continue reading on narkive:
Loading...