In he future dev of my application I am going to need to develop a document management system module where users will be uploading PDF, Images and CAD files etc. Storing these files in the database I believe will not be suitable due to the file sizes. From 100kb up to 1-3mb…at a guess. Hundreds if not thousands of files per project.
I am interested in any feedback on how easy it is to upload files to the server system and any warnings/things to look out for in such an application/module.
I guess you can already make some tests with demo Servoy applications. The provided svyDoc is a .servoy solution that offers a nice document manager. It is a bit old (2006 I think) and it wasn’t compatible in the Web Client. But I think, this is a nice starting point.
Another sample provided by Servoy is the servoy_sample_bug_db (released in 2008 I think) to show the differences between DotNet and Servoy development/implementation. This one is working in the Web Client and if you are interested, you will find it on the Servoy’s web site.
Maybe, you can use these demos to see by yourself if your files are too big and/or if you have too much files. I don’t know the size limit for the db engine you want to use.
Storing files elsewhere, let’s say on a Web server can lead to serious security concerns… Unless these files are public and didn’t need to be protected.
If you didn’t want to store your external files inside a database, I recommend using some server-side scripts that will 1: get_the_uploaded_file, then 2: save the file on another folder then the Web server (a protected disk/partition on the server) then 3: send_the_requested_file_or_the_TempDownloadLink to the user by email. PHP is a great language to accomplish that kind of work.
I guess there is other/better solutions then the one I’m proposing.
I have always been told / read online that the storage of files in the DB is possible but not advisable as it increases the size dramatically and affects performance.
I am basing my typical install on Mysql and have not yet decided on whether I am using one install/customer or Fast, Friendly, Sexy, SaaS.
If I am lucky enough to get 100 customers running on a SaaS server it is possible that each project they have will contain 2000-3000 files @ approx 2gb (checked office this morning). On 100 projects per customer this is 20,000GB of data.
Thinking about it I could stick all of the data in one DB, or have a db for each customer or use the DMS as a local module installed on a server in the companies office/internet server (is it possible) and have everything elese running off a SaaS server.
Storage of the files in the DB seems more convenient & tidy and I would do it if things worked out that way. I remember reading about a Servoy Developer who was in the medical business who stored medical data including xray scans etc. On a large scale like this I guess anything is possible.
I can not really comment on what is best: File System or Database.
What I can tell you is that you need to stream those files to either one of them.
I guess it is preferred not to freeze the UI while doing so.
For that you could use the DataStream Plug-in (http://www.it2be.com/plugins-for-servoy … am-plug-in).
It makes streaming easy, feedback is provided (show a dialog or not) and it does not matter if you stream to or from a database or filesystem (client or server)…