TentaCrew / STOFMA

Student Office Manager, manage your cafeteria sales and purchases easily.
http://dev.bde-ciaa.fr
5 stars 3 forks source link

MongoDB / Deployment workflow #30

Closed fwoelffel closed 9 years ago

fwoelffel commented 9 years ago

Hi there!

We are now online on our development server and automated deployment will be set up soon.

I think it's now time to move on from the LocalDiskDB to MongoDB. Please install MongoDB on your environment, and start using it from now. You'll find all you need on the following documentation, which is the official one, provided by MongoDB : http://docs.mongodb.org/manual/installation/

During the next few days, I'll personally work on the deployment workflow and try to smoothen the installation procedures. I also will provide you with a detailed guide on how to install the application on an Ubuntu Server 14.04 distribution.

edouard-mangel commented 9 years ago

Be careful though using MongoDB, you can find many articles or blog posts on the internet warning about that solution for data storage. Some are quite old, and may make you think this is an outdated problem, but I think this recent blog post deserves a read. (title seems scary, but it has several arguments) http://cryto.net/~joepie91/blog/2015/07/19/why-you-should-never-ever-ever-use-mongodb/

fwoelffel commented 9 years ago

Thanks @edouard-mangel for this contribution. In considering the above, we might choose another database system.

Here are the officialy maintained Sails adapters:

Their names are pretty self-explanatory and we clearly won't use any of the two first of this list, neither the mongo one. As far as I know, Redis store its data into the memory and is flushed at each system reboot (I might be wrong on this point).

This leaves us with MySQL and Postgres. Any suggestion?

warlof commented 9 years ago

Redis can be use as a cache mechanism with a cron which will be in charge of extracting them from the memory to the disk. But it's definitely unsafe for an application like stofma. I think you should make your choice between pgsql and  mysql since you already have drivers on sails.

fwoelffel commented 9 years ago

We finally made the choice to use PostgreSQL as our main database system.