From: nwinton@axion.bt.co.uk (Neil Winton)
Subject: Re: DCE Type vs Object UUIDs (Was: Re: Multiple DCE Servers with the same Interface)
Date: 17 Jun 1993 16:42:47 GMT [thread overview]
Message-ID: <1vq6u7$nsu@zaphod.axion.bt.co.uk> (raw)
In-Reply-To: 1vnoq1$82t@paperboy.osf.org
In article <1vnoq1$82t@paperboy.osf.org>, rsalz@osf.org (Rich Salz) writes:
|> 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).)
Yes, this is great and useful. But ... there still seems to be no need to have
both Type and Object UUIDs. An EPV is associated with a Type UUID. The same EPV
can be associated with multiple Type UUIDs. A Type UUID is associated with
(potentially) multiple Object UUIDs. An RPC endpoint is associated with a list
of Object UUIDs.
When an RPC is received, the EPV is selected by looking at the Object UUID (if
any) in the RPC, seeing which Type UUID is associated with that Object UUID and
then selecting the EPV associated with the Type UUID. Now, why couldn't the
selection of EPV just be done on the basis of Object UUID? I don't want to
labour this (thanks for your patience in answering already) but I'm curious as to
what led to the design decision to go for this indirection.
It may be `conceptually cleaner' to say `these objects are of this type, and this
type has this EPV' but it is no simpler in code terms than saying `use this EPV
for each of these objects'.
|> 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.
I appreciate the aim, it is just that the solution chosen in DCE seems
unnecessarily complex. Occam's Razor and all that ... Anyway, I promise to stop
rambling on after this and maybe find something more useful to ramble on about!
:-) :-) :-)
Neil
next prev parent reply other threads:[~1993-06-17 16:42 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
1993-06-17 16:42 ` Neil Winton [this message]
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