nfs4j icon indicating copy to clipboard operation
nfs4j copied to clipboard

NFSv4 Client Improvements

Open hannosgit opened this issue 1 year ago • 1 comments

Hi!

I saw this library and tried it out as an user space client and it worked for my use-case. However it seems that the implementation in the basic-client module is not easy to extend to add more functionality. Would you accept Pull Requests to improve the extensibility of the existing code?

My suggestions would be:

  • Extract the NFS logic from the Main class to a separate class
  • Create a high-level Client class with basic functionality e.g. read/ write/ list etc.
  • Change the visibility of some methods to improve extensibility

hannosgit avatar Oct 23 '24 18:10 hannosgit

Hi, thanks for your interest and offer to contribute to the project. The basic-client was intended as a quick-and-dirty way to test functionality not provided by the OS clients. It was clear that such an approach couldn't be used to provide a stable client library. Some time ago I started to develop a proper library, but I haven't pulled it up to the end https://github.com/kofemann/nfs41-nio2. So, this might be something that you can look at. It uses nfs4j as an external dependency so that some code can be used from here too. Moreover, the pNFS MDS implementation has proxy-io support that shares the same logic.

https://github.com/dCache/dcache/tree/master/modules/dcache-nfs/src/main/java/org/dcache/chimera/nfsv41/door/proxy

kofemann avatar Oct 23 '24 20:10 kofemann