Hi Pete,

  the rule in TFile::Open for opening via rootd currently is:

    "If the url points to the localhost and the file will be opened in
     readonly mode and the current user has read access or the specified
     user is equal to the current user then open local TFile."

This feature is specially important for PROOF where we access files
always via rootd urls (so any worker can access any file) but where the
packetizer optimizes the work so that the workers mostly will get local
files. Using the above feature these local files will be opened directly
as TFile's and won't go through rootd. To force a local file to be
opened via rootd specify as host "localhost". If TXUrl this also
supports then we will have the same behavior. If this "localhost"
feature is supported by netx/xrootd then we can always use that as
"backdoor" to test xrootd on the same machine as where the client runs.

Cheers, Fons.

On Tue, 2004-08-17 at 12:34, Peter Elmer wrote:

> > - support for "localhost" in the url (backward compatible with TNetFile)
>   Ah, yes, I ran into this the other day. In fact I ran into a related feature
> the other day (and spent 30 minutes thinking I was going out of mind): 
> TFile::Open() will force the use of TFile (as opposed to TXNetFile) if it
> thinks that the file really is local. With xrootd there are a number of cases 
> where that will not be the correct behaviour:
>    o When testing client/server on a single machine (in a "hostile" 
>      environment in some other country, my case from the other day...)
>    o When testing the client on a server which uses the olbd to redirect 
>      the client to another machine (which is the one which actually has the 
>      file)
>    o When testing the client on a server which is using the option to stage 
>      the file from mass storage. Accessing it directly often won't work.
>    o xrootd allows the file namespace to be placed "within" another directory,
>      e.g. perhaps my server has space in /mnt/somebigdisk and my clients 
>      are all expecting /store/foo/bar.root type files. I can put it in
>      /mnt/somebigdisk/store/foo/bar.root and with a config option set xrootd
>      up to access that file even if clients come in with:
>            root://myserver//store/foo/bar.root
>      This allows the sysadmins to configure/name filesystems however they 
>      like without being constrained to mount things in an experiment-specific
>      way (e.g. BaBar's filespace starting with /store requiring a mount point
>      /store, etc.)
>   Personally I would be happy to just see this TFile optimization removed
> (since if I ask for root://somehost//path/file.root that is probably what I
> meant, not "/path/file.root"), but if somebody really depends on that I guess
> a TEnv parameter to allow me to force it to use TXNetFile would be fine.
>                                    Pete

Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail: [log in to unmask]              Phone: +41 22 7679248
WWW:      Fax:   +41 22 7679480