1 Reply Latest reply on Nov 17, 2014 8:28 AM by kcbabo

    Two servers reading same shared folder

    sdjensen

      I looking for best practice for how to handle two (or more standalone servers) working on the same folder at the same time.

       

      Currently I have two servers doing a sftp scanning into the same ftp-server and picks up the files and process them.

      Some times the servers are picking up the same file and as the binding is sftp, I cannot lock the files to avoid this problem where both servers are getting errors (cannot read file or cannot retrieve file).

      I have tried using "premove" but it did not help.

       

      1) Will it work better if we connected the two servers as a cluster so only one process is working at the time?

      2) Create a process which pick up the file from the ftpserver and place them in ex. a queue?

      3) Allow only one of the processes to run?

      4) Change sftp binding to a file binding as file binding is better handling file pickup collision?

       

      If I choose 2) or 3) I will have a problem in case the process for some reason dies.

       

      If I choose 4), what is the needed parametres for best handling the files?

       

      edit: I'm using Switchyard 1.0 on EAP 6.0.