From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f678f,2dfca2977fa82d3b X-Google-Attributes: gidf678f,public X-Google-ArrivalTime: 1993-02-03 08:39:26 PST Path: sparky!uunet!gossip.pyramid.com!olivea!spool.mu.edu!howland.reston.ans.net!bogus.sura.net!udel!gatech!concert!rock!taco!csljon.csl.ncsu.edu!mauney From: mauney@csljon.csl.ncsu.edu (Jon Mauney) Newsgroups: comp.unix.osf.misc Subject: Re: Autobinding in NCS using UUID as the handle Message-ID: Date: 3 Feb 93 16:39:26 GMT References: Sender: news@ncsu.edu (USENET News System) Organization: NCSU kumark@austin.ibm.com (Kakumanu Kumar (Contractor)) writes: >Hello folks, > I have some trouble understanding how UUID can be used as >a handle for RPC calls. As far as I know, a separate autobinding routine >is to be called to get a REAL handle for OUR handle (in our case, UUID). You must eventually produce a binding handle in order to make the remote call, but you have a couple of options other than what the NCS documentation calls autobinding. You can do the binding once and put the resulting binding handle into a global variable (implicit binding), or you can make "your" handle be a regular binding handle, and again only have to bind once per service host. "autobinding" is appropriate if you want your application to use something sensible to the application as a handle, and hide the translation to an rpc binding handle; a UUID is probably not something that has meaning in the rest of the application. Anyway... >My question is how does the client program know the UUID in the >first place to place a location broker call (using UUID as one of the >parameters for look up)? > Does the client_side programmer have to (manually) look it (UUID) up in the idl file, >then use in the autobinding routines to convert UUID from the UUID string >format to the UUID binary format and then make a location broker call >(within the autobinding routine itself) using binary rep of UUID as a parameter? > >In short my question is how does the programmer know the text rep. of UUID >to use it in the autobinding routines to convert it to a real handle? The programmer can look in the IDL file, but there is no need. The IDL compiler puts the UUID into the .h file it generates, so you can simply pick up the correct variable and get it that way. (This has the advantage of making it easy to change the UUID if necessary). If you are going to call lb_$lookup_interface, simply pass it foo$if_spec.id where foo is the name of the interface declared in idl. Unless your application manipulates multiple objects with the same interface, you can simply provide &uuid_$nil as the parameter to rpc_$bind. > Since NCS is similar to DCE, this question might as well >be true with DCE. The situation in DCE is analogous, although all the names have been changed to protect the innocent. -- Jon Mauney Mauney Computer Consulting mauney@csc.ncsu.edu