Git Product home page Git Product logo

Comments (1)

koivunej avatar koivunej commented on June 2, 2024

This sounds like an interesting usecase! Looking at v0/dag/resolve I was first thinking we would have a part of this implemented, however the implementation might not be at the level of the clients. As the clients used to do the projection in ipfs dag get <path> by invoking dag/resolve http endpoint followed by a block/get, client deserialization and path following. We haven't updated the interface/conformance tests in a while, so not sure what is the today's case for the APIs.

However looking at ipfs.dag().resolve(...) and especially the returned ResolvedNode::Projection, I would expect you to be able to get the projected document or the json fragment in the dom-alike representation we currently support. I think in your case, you might also end up with resolving to directly a block, in which case it wasn't deserialized if no more resolving was needed.

To explain the "lazy deserialization" a bit more; I recall that the HTTP API didn't require any projected document to be returned for dag/resolve endpoint, so it's more than likely that deserialization would had been skipped if possible at the lower ipfs levels as we were developing this targeting mostly the HTTP API tests.

Would like to remind you that the usual caveats in our README still apply; we haven't been able to work on this for a while so it's in a less than ideal level. However I hope the implementation at least will be understandable!

from rust-ipfs.

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.