Java client for xrootd (Alvise Dorigo, INFN-Padova) ==================================================== Instructions for a simple test of the client (copying a file from one xrootd server to another): 1. put XrdCopyFile and NetFile.properties in the same directory 2. make sure to have JDK >= 1.5 (type 'java -version' on command line: I have 1.5.0-rc). For the moment only java 1.5 can run the client because I've got problems with my semaphore implementation, so I need to use 1.5's Semaphore class. This will be fixed. 3. type java -jar XrdCopyFile.jar xroot://@:/ xroot://@:/ where USER_NAME_# are accepted users by xrootd (please, not that authorization is not supported yet) HOST_NAME_1/2 are source and target servers running xrootds. Modify the property 'QUIET' in the NetFile.properties to turn on the full debug messages... Here the status of the project: Currently supported features: 1. Connection timeout (configurable) 2. Connection retrial (configurable number of time) 3. Configurable TCP Window Size 4. Physical connection garbage collecting (TTL configurable) using a thread 5. Logical to physical connection multiplexing 6. Socket broken pipe detection and handling using redirection/rebounce 7. Socket IO error detection and handling using redirection/rebounce 8. Explicit server redirection handling 9. Read cache (configurable size) with pre-read 10. Supported requests: chmod, rm, rmdir (server has a bug), read, write, sync stat, mkdir, open, mv, close, login 11. Remote server kind (data or LB) detection 12. handling of 'oksofar' response in order to transfer large chunks of data 13. handling of 'Wait' server's response 14. Synchronous communication (sending a request lock the communication until a response is received) 15. Max redirection number handling (# configurable) 16. Request retry and max retry number handling 17. home-made Java semaphores, to be comatible with JDK 1.4.2. Useless in JDK 1.5.0 because JDK 1.5.0 supports semaphores natively 18. Easy configuration file in simple format (property=value) or in xml format (only with JDK 1.5.0) 19. Asynchronous communication TODO: 1. Handling of unsolicited responses 2. Refresh request to LB in case of open failure 3. Multiple servers in URI 4. Need to deeply test the Multiclient on same channel and sync communication in case of server error (socket IO or broken pipe) 5. Need to deeply test the redirection in a load balanced environment 6. Authentication support (for now only login is present) ASYNC mode is still experimental and not fully tested. If you want to explore the utility classes (NetFileInputStream/NetFileOutputStream that extend InputStream/OutputStream) with custom client please contact me for more details. have fun Alvise