Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
From: rsalz@osf.org (Rich Salz)
Subject: Re: DCE Type vs Object UUIDs (Was: Re: Multiple DCE Servers with the same Interface)
Date: 16 Jun 1993 18:29:21 GMT	[thread overview]
Message-ID: <1vnoq1$82t@paperboy.osf.org> (raw)
In-Reply-To: 1vn9bo$ce7@zaphod.axion.bt.co.uk

In <1vn9bo$ce7@zaphod.axion.bt.co.uk> nwinton@axion.bt.co.uk (Neil Winton) writes:
>(although it is arguable whether the `type' isn't really just the interface
>presented).

No, a type is not the interface but the implementation of that interface.

Let me try again with my printer example.  Suppose I have each printer as
a UUID.  Suppose I have a print_text operation.  That does this:
	print_text(uuid_t printer, char *text)
	{
	    if (is_a_postscript_printer(printer))
		convert_to_postscript_and_print(text);
	    else if (is_a_daisy_wheel_printer(printer))
		send_text_to_printer(text);
	}

This can get kind of messy when you have more than two types -- every
function that is printer-specific must have a cascading set of if/elseif
statements to handle all the cases -- and hard to administer when you have
many objects.

Instead, your server says at the beginning "uuida is a postscript printer"
and "uuidb is a daisywheel printer" and so on.  Then, when a print_text
operation comes in, the RPC runtime automatically invokes print_text_ps
and print_text_daisy.  (You have to write those routines, and associate
them with the postscript and daisywheel manager dispatch table (MEPV).)

It is analogous to the standard problem of writing generic code in C:
you have to put switches all over the place, or use C++ where the
compiler does it for you automatically.
	/r$


  reply	other threads:[~1993-06-16 18:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-06-07 17:50 Multiple DCE Servers with the same Interface Barry P Sheward
1993-06-08 15:48 ` Greg Brail
1993-06-10 13:47   ` Barry P Sheward
1993-06-15  9:56     ` Neil Winton
1993-06-15 12:11       ` Rich Salz
1993-06-16 14:05         ` DCE Type vs Object UUIDs (Was: Re: Multiple DCE Servers with the same Interface) Neil Winton
1993-06-16 18:29           ` Rich Salz [this message]
1993-06-17 16:42             ` Neil Winton
1993-06-18 21:02               ` Greg Brail
1993-06-21 12:38                 ` Rich Salz
1993-06-22 21:45                   ` Greg Brail
1993-06-23 18:59                     ` Rich Salz
1993-06-24 15:14                       ` Greg Brail
1993-06-10  0:00 ` Multiple DCE Servers with the same Interface Per Igel
1993-06-11 19:54 ` Examples of IDL unions Naved Khan
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