From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f678f,897502692464f25e X-Google-Attributes: gidf678f,public X-Google-ArrivalTime: 1993-06-17 09:51:29 PST Path: gmd.de!newsserver.jvnc.net!howland.reston.ans.net!torn!nott!bnrgate!bnr.co.uk!uknet!zaphod.axion.bt.co.uk!nwinton From: nwinton@axion.bt.co.uk (Neil Winton) Newsgroups: comp.unix.osf.misc Subject: Re: DCE Type vs Object UUIDs (Was: Re: Multiple DCE Servers with the same Interface) Date: 17 Jun 1993 16:42:47 GMT Organization: BT Laboratories Distribution: world Message-ID: <1vq6u7$nsu@zaphod.axion.bt.co.uk> References: <1vk6bj$ooi@zaphod.axion.bt.co.uk> <1vkea7$oub@paperboy.osf.org> <1vn9bo$ce7@zaphod.axion.bt.co.uk> <1vnoq1$82t@paperboy.osf.org> NNTP-Posting-Host: newton.axion.bt.co.uk 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