Atomic File Moves in Java | Charles Andrews
The basic process is as follows: Get notified that a file has arrived from the source. Atomically move the file to a working directory. Process the tile. Java 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 { } Pretty simple huh? So I thought as well, but there's a few things that you need to watch out for. Permissions Setups drwxr-x--- 2 uploader upload 4096 Sep 23 2013 upload drwxr-x--- 2 processor process 4096 Sep 23 2013 process 1 2 drwxr-x--- 2 uploader upload 4096 Sep 23 2013 upload drwxr-x--- 2 processor process 4096 Sep 23 2013 process You will have two directories, the source directory where your files will be delivered ( upload process . You should also have two users, one uploading the file to your file storage uploader , and one running the Java process which is processing the file processor . The processor upload upload group.Read full article from Atomic File Moves in Java | Charles Andrews
No comments:
Post a Comment