Comments (6)
Hi, @omllobet!
So is it possible to implement multithreading using jnr-fuse? Are there any limitations in jnr preventing that?
Yes, it is possible. No, there are no limitations. jnr-fuse is a direct wrapper around fuse that directly calls fuse methods. That also implies that your filesystem implementation has to be thread-safe.
from jnr-fuse.
Hi @SerCeMan
Thanks for your answer. Do you have any example of a jnr-fuse filesystem using multithreading? If not, could you give me some recommendations or hints or a general idea to get me started? For example in my mind it is not clear how a fuse operation would be translated to it's own thread in java.
Thanks
from jnr-fuse.
Hi, @omllobet!
You can think of it as "I don't know the thread that every single fuse method will be called on and I'll have to synchronise access to all shared state.". MemoryFS is an example of a thread-safe FS. Although it is not non-blocking, it uses synchronized
.
from jnr-fuse.
Hi @SerCeMan
Thanks for the information, it is a read only filesystem and not very complicated, so it should be doable. It is enough to have multithreading in the filesystem just by making it threadsafe?
The calling part is where my mind has more problems. But if I understand correctly If I do 2 copy operations on the mounted filesystem each one will go to the same thread in java or not? something like cp program-> c library -> system call -> kernel -> (fuse ) -> libfuse ->java program. Do I have to create the threads in java to be able to manage various call (like in a rest program where there are some threads waiting for incoming connections) or a thread is created by libfuse for each operation?
Thanks again!
from jnr-fuse.
Do I have to create the threads in java to be able to manage various call
You don't have to create threads manually. Given that Java thread is a wrapper around a native thread, you'll be operating on a thread created by fuse
. You can also read a discussion around a similar question: https://sourceforge.net/p/fuse/mailman/fuse-devel/thread/[email protected]/ for references.
from jnr-fuse.
Great, thanks for the information.
from jnr-fuse.
Related Issues (20)
- Java 9 module support HOT 1
- write throughput very low compared to read HOT 1
- Problem with samba share folders (jnr-fuse + winfsp) HOT 2
- Capturing SetSecurity events HOT 2
- Fix CVE-2014-4043 HOT 4
- Wrong dependency scopes in release 0.5.6 HOT 2
- GraalVM native image support
- Winfsp and jnr-fuse not working HOT 3
- Why not implement the inode interface provided by kernel fuse to replace the current path interface? HOT 5
- Program doesn't shut down properly in some cases on windows
- JVM crash with jnr-fuse and javafx
- WinFsp 1.12 doesn't pass the CI check
- Test failures on AWS Graviton (ARM, aarch64 GNU/Linux)
- Winfsp read callback random offset
- I can't get getxattr() working HOT 1
- -bash: cd : mydirectory: Input/output error HOT 1
- Path Problem with Windows HOT 6
- The wrapper.jar is stale. HOT 4
- Can't run in gradle HOT 2
- Multiple folders created by FUSE cannot be monitored at the same time HOT 3
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 jnr-fuse.