• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Distributed Objects return values...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Distributed Objects return values...


  • Subject: Re: Distributed Objects return values...
  • From: Andrew Zamler-Carhart <email@hidden>
  • Date: Fri, 23 Aug 2002 09:43:49 -0700

Kevin,

I have a very complex app using Distributed Objects and I pass my own custom objects back and forth between the client and the server all the time. DO actually creates an NSDistantObject in place of a custom object that I've passed, and any messages send to the NSDistantObject are forwarded to the actual object. It doesn't matter if the real object lives on the client or the server.

The main issue is optimizing the system for speed. Be sure that you have read and understood the chapter on Remote Messaging in the book Inside Mac OS X: The Objective-C Programming Language. Here's the relevant page:

/Developer/Documentation/Cocoa/ObjectiveC/4objc_runtime_overview/ Remote_Messaging.html

Specifically, pay attention to these type qualifiers:

oneway - don't wait for a method to return
in - argument only being passed in, won't be referenced later
out - argument only used to return a value by reference
inout - argument passed in and will be referenced later
bycopy - copies the data instead of making an NSDistantObject, useful for immutable objects
byref - creates an NSDistantObject (default)

Andrew

On Thursday, August 22, 2002, at 05:44 PM, Kevin Elliott wrote:

Greetings all.

I'm about to start work on a project involving using distributed objects
between to different processes (a GUI app and a daemon). I've been doing a
bit of poking around and have started to get a pretty good handle on things
(though if anyone knows of good sample code I'm still looking...).

The question I've got is this- clearly I can return simple stuff (BOOL, int,
etc.) and framework objects (i.e. NSStrings). However, how far does this
extend? What happens if I define my own class and return it? How does that
interaction happen? In particular I'd like to be able to do something along
the lines of:

class MyObject: NSObject
{
NSString* myName;
NSString* myAge;
}
- (NSString*) getName;
- (NSString*) getAge;

Build the object in one process and then pass it to the other and have
everything work. Am I asking to much? Does anyone of know of a good
example that does this sort of complex interaction.

-Kevin Elliott
Software Engineer
CharisMac Engineering
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Distributed Objects return values...
      • From: Andy <email@hidden>
References: 
 >Distributed Objects return values... (From: Kevin Elliott <email@hidden>)

  • Prev by Date: Re: EXC_BAD_ACCESS in an strange place
  • Next by Date: Re: EXC_BAD_ACCESS in an strange place
  • Previous by thread: Distributed Objects return values...
  • Next by thread: Re: Distributed Objects return values...
  • Index(es):
    • Date
    • Thread