Comments (4)
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.
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.
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.
Released in https://github.com/pojntfx/go-nbd/releases/tag/v0.3.0
from go-nbd.
Related Issues (10)
- client.Connect() never returns HOT 1
- github.com/pilebones/go-udev is GPL3.0 Licensed Which Prohibits Static Linking HOT 1
- Make optimal memory allocation HOT 8
- Add support for NBD_FLAG_CAN_MULTI_CONN to the client HOT 6
- Size return 0 with standard blockDevices in FileBackend which leads to mount error on client side HOT 1
- Map empty string export name to default HOT 2
- Support NBD URIs in the client HOT 2
- Support PID file or some indication that the server has started HOT 3
- Support socket activation HOT 2
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 go-nbd.