saga-project / bliss

ATTENTION: bliss is now saga-python. Please check out the new project website for the latest version: http://saga-project.github.com/saga-python/
http://saga-project.github.com/saga-python/
Other
8 stars 4 forks source link

intuitive urls for file transfers #71

Closed marksantcroos closed 11 years ago

marksantcroos commented 12 years ago

If one currently wants to write a local file to a remote destination one needs to write:

r = saga.filesystem.File('srm://localhost/tmp/output.txt') r.copy('srm://tbn18.nikhef.nl/dpm/nikhef.nl/home/vlemed/mark/bliss/output.txt')

Preferably this should be:

r = saga.filesystem.File('file:///tmp/output.txt') r.copy('srm://tbn18.nikhef.nl/dpm/nikhef.nl/home/vlemed/mark/bliss/output.txt')

(Maybe late binding is not required and a special case can be made for "file".)

andre-merzky commented 12 years ago

This will require late binding, in one form or the other. Reason is that on::

r = saga.filesystem.File('file:///tmp/output.txt')

your implementation needs to do some things (test for existence for example), so one adaptor needs to be called. But afterwards, you do not know what will be called::

if ( random (1) > 0.5 ) :
   r.copy('srm://host.net/tmp)
else :
   r.copy('ssh://host.net/tmp)

so you need to be able to switch to another adaptor dynamically.

A.

marksantcroos commented 12 years ago

I agree, but maybe it can be some light weight late binding only for "file". My point was that from a user perspective, late binding is not a requirement.

andre-merzky commented 11 years ago

fixed in saga-python (in an ugly way though)