Giter Club home page Giter Club logo

Comments (4)

pojntfx avatar pojntfx commented on August 25, 2024

That would be very interesting! From an implementation perspective, I def. see this as being possible, and its a minimal enough extension for it to keep being close to the baseline implementation while offering performance improvements IMHO. Currently, we just read messages from a single connection, switch on their option, forward them to the backend and stop when the client sends the disconnect, so switching to this could probably be done by finding a way to track a client and then just spawning this loop for each new connection I suppose.

from go-nbd.

pPanda-beta avatar pPanda-beta commented on August 25, 2024

I tried experimenting by just making one line change here and it worked.

- 					TransmissionFlags: 0,
+ 					TransmissionFlags: 0b1000_0001_0000_0000,

First high bit represents NBD_FLAG_HAS_FLAGS
and 8th one represents NBD_FLAG_CAN_MULTI_CONN

We can define those constants and make the flag part of Options struct.

from go-nbd.

pojntfx avatar pojntfx commented on August 25, 2024

That's neat, I'll def. take a look. Having parallelism could def. speed things up - and the backends already need to handle locking themselves since its possible to connect more than one client, so this should be possible in a backwards-compatible way, too.

from go-nbd.

pojntfx avatar pojntfx commented on August 25, 2024

Released in https://github.com/pojntfx/go-nbd/releases/tag/v0.3.0

from go-nbd.

Related Issues (10)

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.