Comments (4)
@supermajor , @nosamad: Would you comment the following proposal, please?
Problem
Webfuse serves only the first connected websocket provider. To allow more than one provider, we have to solve the problem, how inodes are managed:
Each incoming fuse request comes with an inode, used to identify the regarding filesystem object. If only one provider is connected, we can delegate each request to the provider, since all inodes are managed by the same provider.
If more than one provider has to be served, we must delegate the requests depending on the inode value. But this can be tricky, since inodes are currently managed by provider, not by webfuse daemon.
Proposal
To solve this problem without API changes, I propose to use a separate fuse session for each provider. Each session should have its own inode "namespace", therefore we can delegate each request to the correct provider, without the need of any fancy inode management.
To separate each filesystem, I propose to create subdirectories of the mount point. Names could be a session id in first step. A correct naming sceme can be delivered separately - in another feature.
Sounds good?
from webfuse.
For a first implementation your proposal will be sufficient. From usability aspect it would be nicer to have a namespace identifier which can be used to identify the client or better the providing service uniquely.
I think this may lead to API changes.
I was thinking about to propose the clients IP and Port for use as service (namespace/session) identifier, but that will be problematic, when used in conjunction with a reverse proxy. There is still the possibility to forward the client remote information (x-forward-for), but that can be faked.
Actually I think we should start simple, so that the necessary information are provided by the client and validated by the daemon, which acts as kind of service registry!?
from webfuse.
@nosamad: You are absolutly right. Allowing clients to register a filesystem will lead to API changes. A client should be able to register more than one filesystem per session. Therefore, each filesystem needs an identifier to distinguish the target of fuse requests.
Since this is a major API change, I prefer to implement it all together within multiclient branch.
from webfuse.
Multiple clients are supported now.
from webfuse.
Related Issues (20)
- Add project documentation HOT 1
- Add an authentication mechanism HOT 1
- Add TLS support HOT 1
- Make webfuse legacy HOT 1
- webfuse provider: allow to specify authentication token via command line HOT 1
- webfuse2 authentication exposes authentication token HOT 1
- Make timeout configurable HOT 1
- Add JavaScipt example HOT 1
- error: use of undeclared identifier 'closefrom' [clang-diagnostic-error] HOT 3
- Ready for 0.1.0? HOT 1
- Provider/Client should support authentication HOT 1
- Provider/Client cannot be integrated in existing lws applications HOT 1
- Timeout is ignored in *_service calls when libwebsockets 3.2+ is used HOT 1
- Switch Build System to Meson (remove CMake support) HOT 2
- Crash during Unit Tests on arm32v7 HOT 1
- Deadlock when reading files larger that 4 KByte HOT 2
- Failed to read file: parallel fuse requests are dropped HOT 1
- Provide unit tests HOT 1
- Add provider as native executable HOT 1
- Add protocol specification HOT 1
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 webfuse.