Giter Site home page Giter Site logo

Comments (5)

schomatis avatar schomatis commented on August 30, 2024

Agreed, we're imposing the batch.

it would be the user of the importer responsibility to call Commit when the importer has returned, if a Batch dag service was used in the first place.

Could we expand the DagBuilderParams.New function (or create a new one) to allow to set (or not) the batch service? That way we could maintain the DagBuilderHelper responsibility of calling commit if the batch service was set in the first place (to avoid laying that burden on the user of the importers that would need to add the Commit line after every already existing Layout call). Would that work for you?

from go-unixfs.

hsanjuan avatar hsanjuan commented on August 30, 2024

@schomatis that works (hopefully the code can stay clean-ish).

Still, I do feel the batching or not batching should not be a responsability of this module. We could take the chance that this is only used in ipfs and cluster to simplify it. Adding the batch wrapping directly on go-ipfs when adding is by all means a very simple task and it's probably where it should be (in a explicit fashion). Your call!

from go-unixfs.

schomatis avatar schomatis commented on August 30, 2024

Yes, I kind of agree, when I was refactoring the balanced builder the close/commit logic felt kind of weird. It's fine by me if you want to take out the commit logic part (or ping me if you need help), cc'ing @Stebalien in case he wants to weigh in here.

from go-unixfs.

hsanjuan avatar hsanjuan commented on August 30, 2024

@Stebalien any feedback? @whyrusleeping (this might affect fc too)

from go-unixfs.

Stebalien avatar Stebalien commented on August 30, 2024

I agree this is a higher-level concern. If a user passes a batch into the importer, the user is responsible for committing the batch.

This is probably left-over from when this was built-in to go-ipfs (and we didn't really care about other users).

from go-unixfs.

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.