Comments (6)
@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.
here are the events i used to make the ipld-resolver-viz
7a012d0
from js-ipld.
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.
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.
from js-ipld.
We son't use pull-streams anymore, hence closing this issue.
from js-ipld.
Related Issues (20)
- An in-range update of ipfs-repo is breaking the build 🚨 HOT 2
- An in-range update of multicodec is breaking the build 🚨 HOT 3
- An in-range update of multicodec is breaking the build 🚨 HOT 2
- An in-range update of ipld-raw is breaking the build 🚨 HOT 2
- An in-range update of ipld-ethereum is breaking the build 🚨 HOT 2
- An in-range update of aegir is breaking the build 🚨 HOT 2
- An in-range update of aegir is breaking the build 🚨 HOT 5
- Enhancement: Remove dependency on IPFS Blockservice HOT 7
- An in-range update of multicodec is breaking the build 🚨 HOT 2
- An in-range update of aegir is breaking the build 🚨 HOT 7
- An in-range update of aegir is breaking the build 🚨 HOT 2
- An in-range update of ipld-in-memory is breaking the build 🚨 HOT 2
- An in-range update of ipld-in-memory is breaking the build 🚨 HOT 2
- An in-range update of ipfs-repo is breaking the build 🚨 HOT 3
- An in-range update of aegir is breaking the build 🚨 HOT 2
- IPLD with multithreading constraints HOT 1
- Usage instructions fail when run in jest. HOT 2
- TypeError: Cannot read property 'length' of undefined
- Examples of connecting js-ipld to a local IPFS node? HOT 4
- Typings for typescript users? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from js-ipld.