directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel L├ęcharny <elecha...@gmail.com>
Subject Replication connection algoithm
Date Tue, 04 Dec 2012 14:16:41 GMT
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

  for each consumer
    do
      init consumer
      create new replication thread
      add a ping for this consumer
      start it
    done


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 


Mime
View raw message