dragotin / kraft

Kraft helps to handle your daily quotes and invoices in your small business.
http://volle-kraft-voraus.de
GNU General Public License v2.0
56 stars 18 forks source link

Multiple users simultaneously in one mysql database #139

Open ghost opened 2 years ago

ghost commented 2 years ago

Hey

I have Kraft running on 2 Arch systems remotely connected to Mariadb and the Kraft folder is synced via Seafile. If we (2 people) work with Kraft at the same time, what would be the disadvantage of this?

So for example: Each of us creates a different quote and adds a few templates for materials and time. Or what would happen if we changed a template at the same time? Would the last change simply take effect?

Thanks!

dragotin commented 2 years ago

That is untested and nothing I would recommend out of the box. There is absolutely no protection against overwriting changes that the other user made IF the two work on the same document. If you can avoid that by rules aside from code, I do not see atm why that would fail (which does not mean it can not fail obviously). For the templates, it is similar: No synchronisation support in a sense that the db is locked as long one user writes.

Keep in mind that the document number is synchronized via the database and is set at the first save of a new document.

Please, if you try that, make sure to have good backups and keep your eyes open.

Please let me know how that works. This is a usecase I will work on to support.

noseshimself commented 2 years ago

It works quite well; possible accidents might be even less likely if *ID columns in the database were not (auto-incremented) integer values but UUIDs. The really interesting question is right now getting an encrypted connection to your database.