Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
From: mauney@csljon.csl.ncsu.edu (Jon Mauney)
Subject: Re: Autobinding in NCS using UUID as the handle
Date: 3 Feb 93 16:39:26 GMT	[thread overview]
Message-ID: <mauney.728757566@csljon.csl.ncsu.edu> (raw)
In-Reply-To: C1uAnH.1n6C@austin.ibm.com

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


  reply	other threads:[~1993-02-03 16:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-02-02 21:06 Autobinding in NCS using UUID as the handle Kakumanu Kumar (Contractor)
1993-02-03 16:39 ` Jon Mauney [this message]
1993-02-03 19:02 ` Craig_Everhart
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox