RE: ENRP Server Hunt Timer

c s chandrashekaran-A14667 <[email protected]>
Newsgroups gmane.ietf.rserpool
Message-ID <[email protected]>
> -----Original Message-----
> From: Thomas Dreibholz [mailto:[email protected]]
> Sent: Tuesday, November 02, 2004 9:35 PM
> To: c s chandrashekaran-A14667
> Cc: Johnson Walter-CWJ002; [email protected]
> Subject: Re: [Rserpool] ENRP Server Hunt Timer
> 
> 
> On Tuesday 02 November 2004 14:16, c s chandrashekaran-A14667 wrote:
> > I agree with the upper limit and with the idea of 
> continuing to try (I
> > think at the upper limited value of the timer). However it 
> may be simpler
> > to keep retrying forever. The application or user, can 
> decide after certain
> > number of failures to use ASAP (like register; name 
> resoution etc) whether
> > or not to shutdown. We would not need an additional 
> configuration parameter
> > in that case.
> 
> This would imply an asynchronous API, e.g. the user calls 
> StartNameResolution(), which initiates the name resolution in 
> background and 
> returns immediately. Finally, the user application is 
> notified - by signal (a 
> bad idea!) or callback - and then calls a function 
> GetNameResolutionResult() 
> - or the user aborts the name resolution when he decides to 
> have waited long 
> enough. Example:
> 
> void callback()
> {
>    Notify main program that name resolution has been successful
> }
> 
> ok = StartNameResolution();
> if(!ok) {
>    cerr << "ERROR: Unable to initiate name resolution" << endl;
>    exit(1);
> }
> Start a timer -> nameResolutionCallback
> ...
> while(...) {
>    if(Name Resolution Event) {
>       Name resolution successful!
>    }
>    if(Timer Event) {
>       Name resolution failed!
>    }
>    ...
> }
> 
> Probably, the program also has to care for thread safety in 
> the callback 
> function!
> 
> 
> An asynchronous API is quite complicated. Giving a maximum 
> number of trials 
> directly to a NameResolution() function is much easier to use 
> and much nearer 
> to the existing DNS name resolution API. Example:
> 
> result = NameResolution("MyPoolHandle", 10 Trials)
> if(result == NULL) {
>    cerr << "ERROR: Name resolution failed!" << endl;
>    exit(1);
> }
> 

I agree with this entirely. It would not be a good idea to have complexity of a callback. I did not imply that with my earlier statement. I agree with the idea that apis like NameResolution, registration etc end after a certain number of failed tries (as already specified in the ASAP specs). I was suggesting that ENRP server hunt continues even after this at the ceiled value of the timer; without stopping after some number of tries. 

> 
> Best regards
> -- 
> ==============================================================
> =========
>  Dipl.-Inform. Thomas Dreibholz
> 
>  University of Essen,                            Room ES210
>  Inst. for Experimental Mathematics              Ellernstraße 29
>  Computer Networking Technology Group            D-45326 Essen/Germany
> --------------------------------------------------------------
> ---------
>  E-Mail:     [email protected]
>  Homepage:   http://www.exp-math.uni-essen.de/~dreibh
> ==============================================================
> =========
> 
Regards
Chandra
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.