[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference tuxedo::dce-products

Title:DCE Product Information
Notice:Kit Info - See 2.*-4.*
Moderator:TUXEDO::MAZZAFERRO
Created:Fri Jun 26 1992
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2269
Total number of notes:10003

2228.0. "CDS write access with register_named_object" by BHAJEE::KONRAD (pour des nouvelles aventures) Thu Apr 24 1997 08:23

We're using the XIDL C++ extension of DCE 2.0 within our project. 

During server startup, we create Named RPC Objects and register them with CDS
using the register_named_object function (provided by the C++ RPC base classes). 
example entry:  /.:/subsys/PATIS/... /MyRpcClass/instance_1

Any restart of the server re-registers the same objects with the same object
names, the CDS entries and all their attributes remain constant with any
follow-up  registration. So far, things work fine. 

However, when the master CDS replica of the corresponding CDS directory (in the
above example /.:/subsys/PATIS/... /MyRpcClass/ ) is not available, any
re-regitration fails. This means that the master replica of such a directory is
a single point of failure for server startup. 

However, from the manuals I got the impression that re-writing an already
existing namespace entry with identical attributes wouldn't write-access the
entry at all - if this were true, a re-registration should be possible even if
the master replica isn't available. 

What's really going on ??


thanks
	-hermann
T.RTitleUserPersonal
Name
DateLines
2228.1duplicate write is still a writeTUXEDO::CHUBBFri Apr 25 1997 14:2810
    Your register_named_object call comes down to a rpc_ns_binding_export()
    in the end.  It will rewrite the entry even if its duplicate.  It's
    inefficient for CDS to check against what's already in the namespace
    every time it wants to do a write.
    
    Can you tell me what documenation you saw that led you to believe the
    entry wouldn't be rewritten?  We need to fix the doc. if its
    misleading.
    
    -- brandon
2228.2no documentation errorBHAJEE::KONRADpour des nouvelles aventuresMon Apr 28 1997 09:4440
 >   Can you tell me what documenation you saw that led you to believe the
 >   entry wouldn't be rewritten?  We need to fix the doc. if its
 >   misleading.

	Perhaps I should have read the documentation more thoroughly. The
product guide DCE for Digital Unix on page 7-29 explains the operations
performed by register_named_object. I referred to 1. - but it only says "a name
service entry is *created* if one is not already there... " So no documentation
error, no need for a fix. 
	
 > Your register_named_object call comes down to a rpc_ns_binding_export()
 >   in the end.  It will rewrite the entry even if its duplicate.  It's
 >   inefficient for CDS to check against what's already in the namespace
 >   every time it wants to do a write.

	O.k. now I understand the behavior. Some additional questions: 

Question 1: does this mean that the directory containing the "modified" entry
gets skulked ??


Question 2: this also means that a server *restart* with an identical server
configuration will not be possible when the CDS master replica (the one that
contains the server's entries) is not available. That's what I also found out in
my tests. So here the second question: 

Is there any workaround or strategy to avoid this single point of failure ??

Moving the master replica to another clearinghous takes quite some time. It
probably works fine when you plan to switch off the master replica e.g. for
maintenance etc. However, it seems not to be a good solution in
failover-situations. 

Any other ideas?? 


- hermann

  
 
2228.3just ignore the error on export and runFOUNDR::WOODRUFFMon Apr 28 1997 10:4725
> Question 1: does this mean that the directory containing the "modified" entry
> gets skulked ??

 yes, the skulk time depends on the convergence factor. That is, the skulk
 may not happen immediately.

> Question 2: this also means that a server *restart* with an identical server
> configuration will not be possible when the CDS master replica (the one that
> contains the server's entries) is not available. That's what I also found out in
> my tests. So here the second question: 

> Is there any workaround or strategy to avoid this single point of failure ??

 If you know that the server has been run before and registered properly, you 
 can ignore the error code from the export call and let the server run.

 Or you can read the entry information from CDS and check it with the current
 server's binding list to see if it is the same, if so then there is no need
 to export the name service. (of course, you're note exporting endpoints,
 right?)

garry
 

2228.4BHAJEE::KONRADpour des nouvelles aventuresTue Apr 29 1997 12:2520
>> If you know that the server has been run before and registered properly, you 
>> can ignore the error code from the export call and let the server run.

this works with the standard RPC API. We are using the XIDL C++ extension - the
registration is done within the RPC base class function register_named_object.

Since the routine also does some work to setup process-local data stuctures,
ignoring the failure probably won't help in this case :-(

>> Or you can read the entry information from CDS and check it with the current
>> server's binding list to see if it is the same, if so then there is no need
>> to export the name service. (of course, you're note exporting endpoints,
>> right?)

Same story as above since register_named_object does the whole job.


-hermann