2

I am helping in setting up a web service in which user data will be stored in sqlite databases on a server running perhaps Samba, and one or more web servers will read and write to those databases on the backend. I would like advice as to which network file system to use in an all-linux environment, as well as any other thoughts

jberryman
  • 904
  • 2
  • 10
  • 25

4 Answers4

2

from sqlite docs:

Also, the file locking logic of many network filesystems implementation contains bugs (on both Unix and Windows). If file locking does not work like it should, it might be possible for two or more client programs to modify the same part of the same database at the same time, resulting in database corruption.

so, be very careful! NFS in particular is well known not to follow POSIX behavior, especially about atomicity.

Javier
  • 9,078
  • 2
  • 23
  • 24
1

NFS is probably your best bet. NFS is pretty configurable and will likely prove to be the best tool for the job. If you have any Windows in the mix, CIFS (Samba) is the way to go, but in an all-linux environment, NFS.

That being said, I agree with Ben S. If the only choice is sqlite (which I hope it isn't), NFS is the way go to. But a real DBMS is a much better choice.

Xorlev
  • 1,845
  • 14
  • 12
  • 1
    Adding as Ben S' post is now gone: SQLite isn't really meant for concurrency. Any real client-server DBMS will perform better than a shared SQLite database. If it's not really meant for performance, just an occasional lookup it should be okay. – Xorlev Oct 06 '09 at 19:19
0

I'd suggest a real multi-user database. SQLite is the best choice for single-user apps, not multiple servers.

Osama ALASSIRY
  • 794
  • 3
  • 7
  • 22
0

This really is not what sqlite is for. It is possible but a much more robust system (and easier to maintain) would be a simple mysql installation instead of an entire fileserver.

IanNorton
  • 121
  • 2