interprocess communcation with objective-c

Member
Posts: 129
Joined: 2005.02
Post: #1
I'm currently in need of some interprocess communication with two programs that need to relay small values between each other. without a named mutex option (via pthreads) i have narrowed my choices down to:

1. IPC
2. Distributed Notifications
3. AppleEvents

I was investigating IPC. It looks relatively low level, which is okay, but I'm thinking for my needs it may be overkill? Distributed Notifications is looking like my best bet so far... the only question that comes to mind is if I launch a child program and send it a notification, can I do it *instantly* after I make a NSTask for it, or would I have to sleep for a few. I haven't even looked at AppleEvents. Apple stated in documentation that this is the preferred way of interprocess communication--so I'll probably side with this. I'm just looking if anyone has any advice or has used any of these there before.

Any comments / suggestions will be very helpful. Thanks.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
why not use Distributed Objects? Y'know, the /right/ way to do this with Cocoa?
Quote this message in a reply
Member
Posts: 129
Joined: 2005.02
Post: #3
Well, I've been looking at this (obviously):
http://developer.apple.com/documentation...-TPXREF105

I hope that link works. It's ADC's IPC page. The "Distributed objects are typically not as efficient as many other techniques." sentence is what made me ask for opininons. And then there was the lovely: "Apple events are the primary technology used for scripting and interapplication communication in Mac OS X." that followed. I achieved my goal with distributed notifications today, but I really don't like the mechanics--so I may take a look at distributed objects.
Quote this message in a reply
Post Reply