irods-contrib / metalnx-web

Metalnx Web Application
https://metalnx.github.io/
BSD 3-Clause "New" or "Revised" License
36 stars 36 forks source link

Ticket downloads not thread-safe #365

Open joergsteinkamp opened 1 week ago

joergsteinkamp commented 1 week ago

Dear Kory and colleagues,

as hypothized in our previous issue ticket downloads are not thread safe. If I start a second download shortly before the first is finished, the second download fails with a "500 - Sever Internal Error", since the cached file got deleted by the first download thread. Since irods-rest is not available anymore and irods_client_http_api does not (yet?) provide ticket access, at least I didn't find it, we rely on metalnx ticket access to provide public access to scientific data.

Thanks & kind regards, Jörg

trel commented 1 week ago

ticket access is available via HTTP API

https://github.com/irods/irods_client_http_api/blob/main/API.md#read

joergsteinkamp commented 1 week ago

Thanks Terrell and sorry that I didn't find it myself.

trel commented 1 week ago

That will get you streaming - so if you want parallel performance, you'll have to manage multiple threads with offsets on the client side (at the moment). Good ideas welcome for how to make that better.

joergsteinkamp commented 6 days ago

Hi Terrell, but irods_client_http_api is only possible with authentication, if I get it right. How about anonymous access to data published via tickets? Or did I again oversee something?

trel commented 6 days ago

You can use a ticket with anonymous and an empty password if the anonymous user exists in the Zone.

I believe this is the same requirement / use as how metalnx uses tickets now.