Coder Social home page Coder Social logo

Comments (1)

mpatrascoiu avatar mpatrascoiu commented on July 25, 2024

Hello,

This is a great proposal and it targets a problem we hit very often in FTS/Gfal2 transfers.
The proposed solution needs to be adapted, as Davix cannot resolve the passive host. Instead, it will need to be told this value.

Some theory
In an HTTP-TPC, two parties are involved, named active and passive. You are correct, Davix resolves one of them before the copy operation starts, namely the active party. However, Davix has no way of resolving the passive party and in fact, it shouldn't. It's best to let the active party resolve the transfer location. Davix will simply pass the "passive party" location to the active party, which becomes responsible for doing the host resolution and then the file transfer.

Once the HTTP-TPC starts, the active party will continuously send transfer updates back to the initiating client, in this case Davix. These updates are called HTTP-TPC Performance Markers, and one such field is the RemoteConnections field (best documentation I know on this topic is here). The RemoteConnections field contains the IP address of the passive host.

Back to the problem
Knowing the actual hosts involved in the transfer is very valuable. For this reason, I've created the following issue DMC-1358. The change introduces two new getter methods in the Davix::Copy public API:

    std::string getTransferSourceHost() const;
    std::string getTransferDestinationHost() const;

After the transfer is done, they will return either the hostname or IP value, or empty, if no information is available.

The active party is resolved by Davix, just before initiating the COPY request. The passive party is extracted by Davix from the HTTP-TPC Performance Markers, via the RemoteConnections field.

Here is an example of how FTS/Gfal2 will leverage this information:

$ gfal-copy -v https://eospublic.cern.ch:443/eos/opstest/dteam/file.test https://eospps.cern.ch:443/eos/opstest/dteam/file.test

event: [1670855013815] BOTH   http_plugin	TRANSFER:EXIT	https://eospublic.cern.ch:443/eos/opstest/dteam/file.test (p05151113281066.cern.ch) => https://eospps.cern.ch:443/eos/opstest/dteam/file.test ([2001:1458:301:17::100:e])

All Davix changes have been implemented in commit 969b9a5.

Cheers,
Mihai

from davix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.