Giter Club home page Giter Club logo

Comments (6)

shevron avatar shevron commented on August 16, 2024

I did not implement the GCP support, but to answer the question - no, it is not expected. The expected behavior from basic_external implementations is that they provide an external URL (in this case a signed GCP URL) to send the data to via PUT. If you are getting an error instead, please provide it.

Also since this has the "question" tag I will try to clarify the architecture a bit, so this can later go into documentaiton: basic_streaming and basic_external are two transfer adapters. Each one of them can use different storage backend adapters, and sometimes they can both use the same backend adapter class because that backend supports both "streaming" and "direct" access. I will try to clarify what that means:

basic_streaming is suitable for setups where we want the Giftless server itself to also serve files (or more correctly put, "streams of data"). When enabled, it exposes 3 new endpoints in the Giftless HTTP server to upload, download and verify files. It then delegates all the work of actually working with "files" to the selected storage backend object, which must implement the StreamingStorage interface. This can be anything from local file system (implemented by the LocalStoragebackend), Azure, GCP or AWS storage or even anything else, as long as the upload / download / verify requests are streamed through Giftless itself. This adapter has an upside of simplicity, but a downside that resource-intensive upload / download requests are handled by Giftless itself and not by a highly-scalable backend.

basic_external uses storage backends that implement the ExternalStorage interface and is used for setups where Giftless only handles batch requests and verify requests, and leaves resource intensive upload / download requests to be handled by a separate HTTP service - typically, a cloud storage provider (S3, Azure Blobs, GCP Cloud Storage etc.). When asked for an upload URL, ExternalStorage adapters will provide a signed URL, and based on the LFS basic transfer adapter will send a PUT request to that URL with the data. So light-weight "control" requests are sent to Giftless, and intensive "data" requests are send to an external service.

In reality, some backend adapters can implement both ExternalStorage and StreamingStorage and be used by both basic_* transfer adapters. This is true in the case of the Azure backend, and should probably be true for other cloud backends as well.

BTW the reason they are both called basic_* is because both of them implement the same transfer adapter protocol defined by the LFS spec: the "basic" transfer protocol.

from giftless.

hannelita avatar hannelita commented on August 16, 2024

Thanks for the clarification! I think part of this comment needs to go to the README; I probably got an error for basic_external for not using it properly. It would be good to re-test it on gcp_integration.py and double-check if it was misuse or if there's a bug on the implementation

from giftless.

shevron avatar shevron commented on August 16, 2024

Let's split this into two issues:

  1. Add more background on the different transfer adapters to the docs - copy from the comments above
  2. Let's check that the GCP implementation works properly with basic_external and if not create separate issue(s).

from giftless.

hannelita avatar hannelita commented on August 16, 2024

There is no bug with GCP basic_streaming upload.

from giftless.

hannelita avatar hannelita commented on August 16, 2024

basic_external is not working. Creating a bug - #34

from giftless.

shevron avatar shevron commented on August 16, 2024

I'm closing this as the docs have been updated and the other issue is reported in #34.

from giftless.

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.