View Full Version : Have distributed objects been deprecated?

Apr 6, 2011, 08:02 AM
The Remote Messaging part of the Apple's Objective C Programming Language guide has gone. Has Apple (perhaps by stealth) deprecated Objective-C distributed objects? It doesn't look like it's been implemented in iOS, which is a shame. I thought it would be a great communication system between Mac and iOS. Does anyone know of or have any experience with using distribute objects in classic RPC-style client/server projects? I'm just wondering if I should ignore it even for architectural prototypes and just use a "standard" communication system.

Apr 6, 2011, 11:49 AM
The main class for distributed objects is NSProxy and its concrete subclass NSDistantObject. These are in the Foundation framework. Mac OS X and iOS use the same Foundation framework. There does not appear to be any deprecation note on either of these classes.

Apr 6, 2011, 03:58 PM
I don't think iOS does share the same Foundation framework as Mac OS X. iOS seems to lack NSConnection and NSDistantObject. It does have NSPort, but only NSMachPort, not NSSocketPort.

Apr 6, 2011, 06:43 PM
Given that multi-tasking is relatively new and that iOS is still primarily focused on a single active application, it would make sense that NSProxy has not been implemented. My guess would be that this is the opposite of "deprecated": expect at some point down the road that these things will be implemented. In the meantime, you will have to work with what lower-levels are available to suit your needs.

Apr 7, 2011, 12:41 PM
The main issue I've encountered with distributed objects is that they're *too* transparent. The temptation is to treat remote objects as 'just another part of your app', when in fact they really can't be (what happens if the connection is interrupted? or there's suddenly high latency?). The best way to use them is closer to the way you'd use a traditional communication mechanism, with a defined protocol for communicating encapsulated in one remote object representing your communication channel.

Given that design restriction, they start looking a bit less appealing vs other communication mechanisms, although they're still a pretty neat technology.