directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lécharny <elecha...@gmail.com>
Subject Re: Replication connection algoithm
Date Tue, 04 Dec 2012 14:43:32 GMT
Le 12/4/12 3:32 PM, Kiran Ayyagari a écrit :
> I would like to suggest a slight modification
>
> On Tue, Dec 4, 2012 at 7:46 PM, Emmanuel Lécharny <elecharny@gmail.com>wrote:
>
>> Hi,
>>
>> as a follow up for my previous mail, here is a suggestion for
>> replication that handles the disconnection :
>>
>> LdapServer.startReplicationConsumers
>>   create a ping thread
>>   start the ping thread
>>
>> differ this creation of ping thread and move it to PING
>>   for each consumer
>>     do
>>       init consumer
>>       create new replication thread
>>       add a ping for this consumer
>>
> not sure what does it mean by 'add a ping...' here.

It means we will use the consumer config (ie, provider remote host and
port) to do an anonymous bind to the remote server. We can ever use the
userDN and credential to do a real bind, to cover all our bases.
> The ping should rely on the state of the consumer,
> say when the consumer is first created 'ping' thread need not validate this
> consumer's connection
sadly, if the producer has been brutally disconnected, we won't be able
to detect that simply with the consumer thread. The ping should be up an
running beside the consumer thread. Also it should be used to 'wake up'
the connection before it times out.

Btw, we *must* use the same connection.

> however it should kick in to action after consumer successfully starts for
> the first time
>
>>       start it
>>     done
>>
>>
>> PING:
>> ping thread
>>   while not stopped
>>     do
>>       for each consumer
>>         do
>>           try to bind anonymous
>>
>>           if not success
>>             then disconnect consumer
>>         done
>>
>>       wait N seconds
>>     done
>>
>>
>> replication thread
>>   while not stopped
>>     do
>>       connect
>>       if connected
>>         then
>>           do
>>             status <- start replication
>>           while status is refresh request // Special case
>>
>>       if status == stopped
>>         then exit loop
>>
>>       if status == disconnected
>>         then continue
>>     done
>>
>>
>> Thoughts ?
>>
>> --
>> Regards,
>> Cordialement,
>> Emmanuel Lécharny
>> www.iktek.com
>>
>>
>


-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com 


Mime
View raw message