]> git.buserror.net Git - polintos/scott/priv.git/blob - doc/orb/ids
Initial checkin from Perforce.
[polintos/scott/priv.git] / doc / orb / ids
1 IDs are used to identify a specific objects and methods to the ORB. Each
2 address space has its own object ID space, but method IDs are a separate ID
3 space that is shared by all users of an ORB.  Each interface does *not*
4 form its own ID space for methods.  Classes, interfaces, and struct types
5 are merely objects of specific classes, and thus share the object ID space.
6
7 Object IDs
8 ==========
9
10 Applications interact with objects via pointers (or references, or whatever
11 else is appropriate for the language), not IDs.  This includes structs
12 intended for marshalling to another address space.  To deal with this, the
13 ORB accepts all object references in pointer form, rather than ID form. 
14 For object references, the language mapping ensures that the ID can be
15 found from the pointer in a manner consistent with the platform ABI. 
16 Typically, it is stored as some fixed offset of the first word of the
17 entity pointed to.  Structs do not have IDs; see the "memory-management"
18 file for information on how they are marshalled across address spaces.
19
20 When presenting the object to the destination address space, the ORB needs
21 to convert the local object ID to the object ID in the server's ID space. 
22 If the object has not yet been used in that address space, there will be no
23 local ID (or pointer) associated with it.  If this is the case, an object
24 stub will be created by the ORB.
25
26 To maintain the ID->pointer mapping, the ORB will maintain a pointer object
27 for every local ID in an ID space that is not the "home" of the real
28 object.  These objects, whose memory is chargeable to the address space
29 they were created for, contain the application address associated with the
30 ID, as well as a pointer to the real object.  The pointer object may also
31 hold cached results of permission checks.
32
33 For every real object, the ORB maintains a similar internal object, but
34 instead of a pointer to a real object, it contains all the information
35 needed for the ORB to carry out requests on the ID.
36
37 Method IDs
38 ==========
39
40 Each method has an ID which is global to the ORB, which is used when
41 specifying which method to invoke on a given object.  A method will also
42 have an interface-local index "id", which can be used internally for things
43 such as indexing into a pointer-object's cached permission checks, but such
44 indices are not application-visible.  The only pointer associated with a
45 method is its entry point, which is not visible to the client.
46