• 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 Object class loading semantics
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Distributed Object class loading semantics


  • Subject: Re: Distributed Object class loading semantics
  • From: James Quick <email@hidden>
  • Date: Sun, 3 Aug 2003 21:32:56 -0400

On Sunday, August 3, 2003, at 05:56 PM, thomas robson wrote:

From what I understand, when using Distributed Objects, using an object as a
"bcopy" parameter in a method call is only valid if the class of the object is already in the address space of the distant server. This seems to make sense, however, I'd like to send an arbitrary object (id) to the server and then introspect it on the server side. I'd love to have some way of having the class autoload on the server side (similar for example to how RMI uses a classpath to load the object over the network). Can anyone think of a way of approaching this?

How about doing something like the following:

The following assumes you asked if it knew about a particular version of a class and it
said no.

On the sending side, first verify where it came from.

NSBundle *bundle = [NSBundle mainBundle]
bundle = [[anObject class] bundleForClass]; // We've got the bundle it came from

now:
[bundle bundlePath] will give the pathname of the bundle , and
[bundle infoDictionay] will give the info.plist data.

Armed with that, you can send identifying information about where to find the resources
needed to understand the object.

On the server side, you can then use the path and info.plist information to search for
the resource, and verify that is the correct version, (or verify if you have the resources
already in your image.

Now, load the bundle (framework, lib, or plugin), and bind it into the servers image.
Finally, shake hands with the client to say it's OK to send it.

Of course, once loaded, the server may be unable to unload it again, so for
this kind of service you may want to consider, forking a copy of the server, and
reuniting with the client before actually loading and binding.
_______________________________________________
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.
References: 
 >Distributed Object class loading semantics (From: "thomas robson" <email@hidden>)

  • Prev by Date: Re: First slow, then fast
  • Next by Date: Re: beginning C
  • Previous by thread: Distributed Object class loading semantics
  • Next by thread: Re: (no subject)
  • Index(es):
    • Date
    • Thread