Giter Club home page Giter Club logo

Comments (3)

hannahhoward avatar hannahhoward commented on June 27, 2024

Hi @adlrocha -- I am going to start working on this shortly

Wanted to run some stuff by you before I do:
As I see it, the current test cases are broken up covers a few different concerns:

  • Type of host constructed (currently raw tcp socket, Bitswap + Libp2p, full IPFS host)
  • Node topology (full connection between nodes, partial connection with passive nodes, etc)
  • Data fetching method (normal vs waves, UnixFX vs Graphsync)

My thinking is this:

  • the only thing that should constitute a truly different type of test case is the type of host
  • we out to be able to parameterize the sparse and waves test with the general IPFS transfer test, based on supporting paramaterized node topology and fetching methods
  • I'd actually like to match fetching method only cover who asks who for what and when -- and move the graphsync test to be a raw libp2p+graphsync test. That means:
  • TCP = raw transfer,
  • Raw Bitswap = Walk method in utils (though I think we should use https://github.com/ipfs/go-merkledag/blob/master/merkledag.go#L377 which will enable us to add concurrency),
  • Graphsync = graphsync.Request
  • IPFS = UnixFS().Get

All of these tests share a ton of common steps, that I'd like to refactor to be as deduplicated as possible:

  • setting up a data store
  • putting data in the datastore for seeders
  • building a libp2p host (all except TCP)
  • connecting nodes in some kind of topology
  • fetching in some fashion from the other nodes
  • waiting for things to finish

I'd love it if the test cases themselves were quite short -- right now they're hundreds of lines and hard to read to understand what's going on, plus they copy each other a lot.

from beyond-bitswap.

hannahhoward avatar hannahhoward commented on June 27, 2024

I will of course update the compositions in the rfc directories as needed in the PR

from beyond-bitswap.

adlrocha avatar adlrocha commented on June 27, 2024

That'd be awesome, @hannahhoward! Everything you suggest SGTM.

Actually, this is something I've been looking to do myself for a while, but never find the time. I keep copy-pasting and patching test cases to evaluate the prototypes but I never invest the time on structuring the code right (so the tests are completely unreadable by themselves). Thanks!

from beyond-bitswap.

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.