Giter VIP home page Giter VIP logo

Comments (6)

zcstarr avatar zcstarr commented on June 18, 2024 1

@diasdavid just to be clear on this, I'd be replacing the existing get method? Trying to get a sense of what other projects I'd want to look at/ patch if this is the case.

from js-ipld.

kumavis avatar kumavis commented on June 18, 2024

here are the events i used to make the ipld-resolver-viz
7a012d0

from js-ipld.

daviddias avatar daviddias commented on June 18, 2024

Making get return pull-stream sounds like a good idea to me, it matches ipfs.get/ipfs.files.get and prepares the API for the IPLD selector in the future.

I want to keep the API as simple as possible and let any extra porcelain in users land so that we do not increase the size of the codebase (=== tests, maintenance and bundle sizes) until it is completely obvious that it is a really good nice to have.

Following ipfs-inactive/interface-js-ipfs-core#126 (comment), I propose two API changes.

a) add an option to the .get options object to just return the final result (by default it should return all the touched objects)

b) expose two API calls, one that it is .get that returns an array with all the nodes touched and another one that it is .getPullStream that does the same but returns all the nodes touched in a pull-stream

As for the porcelain such as createSpyStream, you can in your codebase create a proxy for .get calls that keeps track of all objects traversed and returns on the SpyStream or you can monkey patch the IPFS node when to create it in your code.

from js-ipld.

vmx avatar vmx commented on June 18, 2024

With the Awesome Endeavour: Async Iterators we want to move away from pull streams. There's also an upcoming API review of all the IPLD stuff, so it doesn't make sense to spend more time on this for now.

from js-ipld.

zcstarr avatar zcstarr commented on June 18, 2024

from js-ipld.

vmx avatar vmx commented on June 18, 2024

We son't use pull-streams anymore, hence closing this issue.

from js-ipld.

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.