This project aims at implementing a pure-Go BSD-3 client library for XRootD using Go builtin features for concurrency and scalability. As part of that project I have worked on the XRootD client, server, and FUSE-based filesystem.
See full proposal for details.
The client is implemented and supports most of the requests.
There are some specific requests that are not implemented yet: go-hep/hep#170, but some of them are fully defined by the current version of the XRootD protocol and are just placeholders.
The client needs to have some more polishing in terms of error and redirection handling:
- What should happen if an initial connection gets aborted?
- We need to re-issue open requests after the redirection since a file handle differs on the new server.
- We need to change the initial session under some circumstances (see http://xrootd.org/doc/dev45/XRdv310.pdf, p. 11).
- We need to have more tests with different kind of issues that can occur: a network connection error, a malformed answer from the server, etc.
Authentification is supported via unix
protocol and Kerberos.
To be done is:
- GSI authentication - unimplemented due to lack of specification (only code is available that is GPL-licensed): issue.
- OAuth-based authentication - see comment.
The client is already being used to implement 2 commands: xrd-cp
and xrd-ls
.
xrd-ls
lists directory contents on a remote xrootd server:
$ /xrd-ls root://eospublic.cern.ch:1094//eos/opendata/atlas/OutreachDatasets/2016-07-29/MC/
/eos/opendata/atlas/OutreachDatasets/2016-07-29/MC
/eos/opendata/atlas/OutreachDatasets/2016-07-29/MC/mc_105985.WW.root
/eos/opendata/atlas/OutreachDatasets/2016-07-29/MC/mc_105986.ZZ.root
...
xrd-cp
copies files and directories from a remote xrootd server to local storage:
$ xrd-cp root://eospublic.cern.ch:1094//eos/opendata/atlas/OutreachDatasets/2016-07-29/MC/mc_173045.DYtautauM08to15.root .
$ ls -alh mc_173045.DYtautauM08to15.root
-rw-r--r-- 1 ematirov ematirov 1.4M Aug 11 18:02 mc_173045.DYtautauM08to15.root
The client supports both Linux
and Windows
(OS X
has not been tested).
The FUSE filesystem is implemented and lacks only hardlink
and symlink
syscalls since they are not supported by the XRootD protocol.
Choice was made between bazil/fuse
and hanwen/go-fuse
libraries. hanwen/go-fuse
was choosen because of more active development.
Also, tests are written to ensure functionality of the FS. There is one remaining bug, but I have had no success with debugging it.
Example of usage:
$ xrd-fuse root://eospublic.cern.ch:1094//eos/opendata/ /tmp/eospublic
The server is in an early stage of work, but it supports some of the most important file operations: go-hep/hep#176. Major remaining milestones are:
- Authentication.
- Support of multiple socket connections (the
bind
request). - Proxying \ balancing queries to the other servers.
The server supports both Linux
and Windows
(OS X
has not been tested).
Github search of all my commits in repository.
List of all commits:
- https://github.com/go-hep/hep/commit/a7fc758c1b26424086a6a739d90b98135c7d04e2
- https://github.com/go-hep/hep/commit/69a61e279bbf1bebdc534da3b569449c9082a1ea
- https://github.com/go-hep/hep/commit/b59faabd7395b06f59c7bb0558af18b2c9ee8caf
- https://github.com/go-hep/hep/commit/4c5e4de6d968a95269f8c8cd56cf362d74146739
- https://github.com/go-hep/hep/commit/a3379e11ad44cc836a355a67c6733689c566e32f
- https://github.com/go-hep/hep/commit/545118723f74b47f79c3a51832bd0f432fe695d4
- https://github.com/go-hep/hep/commit/21c1f45290e0eb41c78d89c6aa6d667c9cb50099
- https://github.com/go-hep/hep/commit/39a3dac1beb1e5b55de4748370a11b63ea374309
- https://github.com/go-hep/hep/commit/849df9ead43fd8eb29d15c7e26d2f23f24e15757
- https://github.com/go-hep/hep/commit/ca05e4631f54ed1bd92bf8ed2172f969f9753aec
- https://github.com/go-hep/hep/commit/cf5e5b5703e55b490480b55d4f575e80b08301e5
- https://github.com/go-hep/hep/commit/87293ae62f02f7c6e767435aed3f901203d487ac
- https://github.com/go-hep/hep/commit/dfaefec175bf0ce3befea9bbc3a0c2a0c0d7a0ac
- https://github.com/go-hep/hep/commit/efafd976e3b04acbff33dc083abadf943d720905
- https://github.com/go-hep/hep/commit/3d874907b211263669e16340eb5ec51b0246bc02
- https://github.com/go-hep/hep/commit/7a7075819a3457e33fbb24dd2f45375f348d0d4a
- https://github.com/go-hep/hep/commit/bfa59af7bfed6fd6d3532b3a73a16c7fdb5cadf5
- https://github.com/go-hep/hep/commit/127001ce428de5c16c735cc45e12860725da3f4a
- https://github.com/go-hep/hep/commit/9194ded325b2b86120cc831215ce01a962336687
- https://github.com/go-hep/hep/commit/286ad4c20014fa48923fc9de0a5779e85b9616f3
- https://github.com/go-hep/hep/commit/5fd0dd28e1d47eb35be47396d2f11547de0941a7
- https://github.com/go-hep/hep/commit/7f037c82ade48cd0936c4cd3e6930b0b46438a5f
- https://github.com/go-hep/hep/commit/86ce88fe8f48b8e1c2e8ef4a6eec9dbe267e2fac
- https://github.com/go-hep/hep/commit/5cee0cab4e6ee9b8e408a70552fe221828611dce
- https://github.com/go-hep/hep/commit/66f601d3bb5ce4e1b5b8a430bb78cce71c88c446
- https://github.com/go-hep/hep/commit/55a94506495048bd9c9c8ec906432900da94ff2f
- https://github.com/go-hep/hep/commit/b8ea2af4725dc07294b915f989e26644fd999338
- https://github.com/go-hep/hep/commit/386b6152d3d14589553f968d36d5e884fc08f3ef
- https://github.com/go-hep/hep/commit/52ae644e4e3ff46cfbf3d87c0ab32dcb82d46997
- https://github.com/go-hep/hep/commit/a448a8a48ed9a2fb6a144ad7b4169f9e729134d1
- https://github.com/go-hep/hep/commit/12373cace4446c665c8f0b78db6544e800ab2ff5
- https://github.com/go-hep/hep/commit/c24403e354615ddde51fd7115058f6f8e2e887a2
- https://github.com/go-hep/hep/commit/a951ea4d6e446db733eab237c17bc48c3ec564ba
- https://github.com/go-hep/hep/commit/5a94ecc970d53997b54740980a94a21fb22cc377
- https://github.com/go-hep/hep/commit/da7ecc705a0e1fcfa5137e838c719b6985902405
- https://github.com/go-hep/hep/commit/bc3e388fe5d0f886a046cf6032c437a8e943bafb
- https://github.com/go-hep/hep/commit/2e0e15a0a0a8ec5fa182a44c6d2814ce0b863fc2
- https://github.com/go-hep/hep/commit/f6cae29efefe545ebe315467c8c23ef893a15dae
- https://github.com/go-hep/hep/commit/0c63256222634a3be4077c2b814943a11419b517
- https://github.com/go-hep/hep/commit/85e36fd0018708fa3c44757baf494eb4a133761c
- https://github.com/go-hep/hep/commit/7d69563f13327d7d1bf2e40d6637b3fd2962ff51
- https://github.com/go-hep/hep/commit/a6536c3d17b274ba330688f1a2481fa85e582f1e
- https://github.com/go-hep/hep/commit/2b9771793eff6bc0b9e2c6729d237e96ea5b03cc
- https://github.com/go-hep/hep/commit/59a444d0f356a91c15fe7101d878e8607ddf2c9a
- https://github.com/go-hep/hep/commit/28c6e1835e3e2d4e4fd2d817e4237c6ab876d417
- https://github.com/go-hep/hep/commit/bbbf3459566bf78fd6a842c2f31767e147636666
- https://github.com/go-hep/hep/commit/7d8842e7594050133ddfddf0c81a666932783ef2
- https://github.com/go-hep/hep/commit/47e6cc1a3b04d785b68483db653187b94c6a3fc4
- https://github.com/go-hep/hep/commit/ddac9d54c2a801d7e8830c18acab18b6e46f4d69
- https://github.com/go-hep/hep/commit/a8841eef891d1ea135b60a08b9b30f3b7b00cf27
- https://github.com/go-hep/hep/commit/4a999e602ecad455e75769fa7d857c91f15f8b98
- https://github.com/go-hep/hep/commit/d1e86553f694c92fa05013327c65fbc44b0c0f7a