Giter VIP home page Giter VIP logo

Comments (8)

armon avatar armon commented on September 2, 2024

The logic can certainly be changed. I think the only requirement is that the steam is not in use. So technically we could wrap around back to one (zero is reserved) and scan for the next free ID. I just haven't had a use case yet for billions of streams ;)

from yamux.

jbenet avatar jbenet commented on September 2, 2024

Notes:

this is sad. wonder if there are other mines in the "using spdy/http2 as a general stream muxer"

from yamux.

mitchellh avatar mitchellh commented on September 2, 2024

@jbenet Thanks for the notes. I agree there is probably a good reason. One thing I can imagine is the "sparse array" issue. There will undoubtably be some stream IDs still in use, whereas atomically incrementing we guarantee they aren't in use to the max int point.

Departing from SPDY would be fine, yamux is already pretty far gone from it. We used SPDY (as well as some other prior attempts at this) as reference material, but made no real intention to follow it.

from yamux.

whyrusleeping avatar whyrusleeping commented on September 2, 2024

after a bit of reading on it, I really dont think that http2 is a good canidate for use as a general stream muxer.

from yamux.

jbenet avatar jbenet commented on September 2, 2024

@mitchellh ok that all sounds good.

btw, if you're interested, we (ipfsers) seek to pick (or make) a simple spdy/http2/quic inspired stream muxer that is simple to implement across languages. we've used yamux with good success so far (shipped in the IPFS alpha), but were exploring spdy/http2 since those will get implementations in other languages faster. Another option is to pick yamux or muxado2 and bite the bullet and write the common denominator impls (go, js, and c). (@mitchellh have you had to use yamux in js yet?)

from yamux.

mitchellh avatar mitchellh commented on September 2, 2024

@jbenet I haven't, but we tried really hard to get http2 to work prior to building Yamux. The main issue we ran into (apologize if this information is incorrect or outdated since it was years ago) was that the semantics of HTTP were too closely tied to the multiplexing. The multiplexing had control messages for things like headers and so on piggybacking onto stream messages and it was hard to separate that.

from yamux.

jbenet avatar jbenet commented on September 2, 2024

makes sense, thanks for the info.

from yamux.

svanharmelen avatar svanharmelen commented on September 2, 2024

As this is a super old issue that never caused me any issues IRL, I'm going to close this one. Thanks!

from yamux.

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.