Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data transfers package #1321

Merged
merged 10 commits into from Nov 20, 2020
Merged

Data transfers package #1321

merged 10 commits into from Nov 20, 2020

Conversation

ishank011
Copy link
Contributor

@ishank011 ishank011 commented Nov 16, 2020

Previously, we had to configure which data transfer protocol to use in the dataprovider service. A previous PR added the functionality to redirect requests to different handlers based on the request method but that would lead to conflicts if multiple protocols don't support mutually exclusive sets of requests. This PR adds the functionality to have multiple such handlers simultaneously and the client can choose which protocol to use.

Depends on cs3org/cs3apis#96, currently uses my fork https://github.com/ishank011/go-cs3apis

InitiateFileUpload response now looks like:

{
  "status": {
    "code": 1
  },
  "protocols": [
    {
      "protocol": "simple",
      "upload_endpoint": "http://localhost:19001/datagateway",
      "available_checksums": [
        {
          "type": 3,
          "priority": 100
        },
        {
          "type": 1,
          "priority": 1000
        }
      ],
      "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJyZXZhIiwiZXhwIjoxNjA1NjM2MzQ0LCJpYXQiOjE2MDU2MzAzNDQsInRhcmdldCI6Imh0dHA6Ly9sb2NhbGhvc3Q6MTcwMDEvZGF0YS9zaW1wbGUvYjk1YjhlOGUtYTgwYi00NjMxLWI3OTgtNTJjY2ZjOGExMTM1In0.g68M_LkQ9Loaz9sJedMK_DmrNMhKwe2R0NNC7gtwYvw"
    },
    {
      "protocol": "tus",
      "upload_endpoint": "http://localhost:19001/datagateway",
      "available_checksums": [
        {
          "type": 3,
          "priority": 100
        },
        {
          "type": 1,
          "priority": 1000
        }
      ],
      "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJyZXZhIiwiZXhwIjoxNjA1NjM2MzQ0LCJpYXQiOjE2MDU2MzAzNDQsInRhcmdldCI6Imh0dHA6Ly9sb2NhbGhvc3Q6MTcwMDEvZGF0YS90dXMvYjk1YjhlOGUtYTgwYi00NjMxLWI3OTgtNTJjY2ZjOGExMTM1In0.AhV2jABWns8t8-YiEQkzAleuTnL5kpVEYxbpOebtCYM"
    }
  ]
}

@update-docs
Copy link

update-docs bot commented Nov 16, 2020

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@ishank011 ishank011 force-pushed the data-tx branch 2 times, most recently from 433674c to e287e17 Compare November 17, 2020 16:21
@ishank011 ishank011 marked this pull request as ready for review November 17, 2020 16:27
@labkode
Copy link
Member

labkode commented Nov 18, 2020

@ishank011 I merged the cs3apis, let's change the dep to it

Copy link
Member

@labkode labkode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ishank011 should we remove the sdk test files?

@ishank011
Copy link
Contributor Author

@labkode Yes we can. I didn't like the idea of calling a remote server to run unit tests in the first place.

@Daniel-WWU-IT can you modify these to run on a local reva daemon?

@labkode
Copy link
Member

labkode commented Nov 19, 2020

@ishank011 still one conflict to resolve

@labkode labkode merged commit b875947 into cs3org:master Nov 20, 2020
@ishank011 ishank011 deleted the data-tx branch November 23, 2020 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants