Looking for an easy way to present database contents as a file system (Windows)

I have a document management system that stores documents in a database. I am looking for a simple way (not too many and complicated protocol to implement) to show the database as a disk in Windows (therefore, it can be viewed and processed using any Windows program, for example, Explorer or office).

I have something in mind that I am providing some kind of network resource that can be installed as a drive in Windows. Unfortunately, all potential network protocols for file sharing seem to require considerable effort to implement.

At first I looked at CIFS, but after I read about it, I quickly decided that its BY FAR is harder for me to implement. The next one was NFS, but it is not supported by Windows (XP) initially, and also seems rather difficult to implement. FTP may be an option, but FTP server implementation is again much more complicated than I naively expected.

Perhaps there is a simpler protocol that I did not think about.

Is there anything that I can (ab) use for this purpose? Ideally, I want some kind of (pure Java) ready-made server, where I could easily separate the part that accesses the local file system and replace it with my own code, accessing the database, or with a simple enough protocol so that I can implement it It’s fast enough and more importantly, compatible and reliable.

+4
source share
1 answer

First, you need to establish the correct bindings between DBS and the database and define / write an API in your program that will describe easy access to the necessary resources. Writing an API Allows you to maximize the interoperability of your solution with other services or plugins that you may want to add later.

After that, you should serve these services to clients through a permissive and reliable protocol such as WebDav, which means web-based distributed creation and versioning. It is initially supported by Windows, you can thus interact with all services that implement WebDav (Windows, most web browsers ...), and you, of course, can connect such services as to a virtual disk. In addition, it is also supported on Linux and MacOS X, I think nativ'ely, but I'm not sure. In fact, WebDav is an extension for HTTP and is described in RFC 4918.

Basically, each version of the HTTP protocol (which controls server-side response processing) for Java can be used to implement WebDav if you have the time and want to do it yourself.

To implement WebDav in this way and with reasonable effort, I searched some of the Java librairies on the Internet and found them, now it's up to you which one really suits your needs:

  • Milton http://milton.ettrema.com/index.html

  • A list of some existing implementations of the WebDav protocol in open source projects at WebDAV.org (you can find quite interesting projects there, such as the Jakarta Slide project, although I think that it is no longer supported by other / librairies projects that show the importance of WebDav Today). http://www.webdav.org/projects/

0
source

Source: https://habr.com/ru/post/1392934/


All Articles