I developed a Laravel application (using Mysql for my database locally and remotly) for a small business and they asked me to make the application usable even if there is no internet connection, so I don't know where to start, What should i do to make my local db (the one in the company's computer) with the db hosted in digital ocean droplet. so that my application can be used in the event of an internet disconnection. when i searched i found the concept of replication but the problem is that database contain links of files and pictures stored in the public/storage folder of my laravel project so i assume im gonna have to sync between the 2 storage folders (the one in the DO server and the one in my company).what should i do?
Asked
Active
Viewed 163 times
0
-
With respect, you should tell that business you don't know how to do that task. You could begin learning how, but it will take months or years for you to gain the necessary skills and implement what they want safely. Or they could hire another software developer who knows how to do that. – Bill Karwin Nov 06 '21 at 11:03
-
@BillKarwin well they know i have never done such a thing that's why they asked me to learn it on my own for them i consider this as an internship and a way for me to learn . so I don't see a reason why I shouldn't take this opportunity to learn, which is why I came here looking for advice on where to find the best resource to start. – youss Nov 06 '21 at 11:11
-
I understand. It's always good to learn. However, this question is pretty broad for Stack Overflow. You should read the Help Center on [asking on-topic questions](https://stackoverflow.com/help/on-topic). They really want questions to be more specific about a single coding problem. – Bill Karwin Nov 06 '21 at 11:21
-
1Not sure I understand the problem here. If the user has no internet connection, unless the database is on their local machine, they won't be able to access any database regardless on whether or not it's replicated or not and regardless where it is so it's now clear how replication would help. – apokryfos Nov 06 '21 at 11:37
-
@apokryfos i'll give you a scenario to better understand: the web application is working fine on "digital ocean", the company staff are using it in order to generate invoices and documents for their clients , and suddenlly there is no internet! i want to have a backup database on the company's computer synchronized with the distant database in my digitalocean server; this way the work won't stop at the company because of the internet disconnection .and when the internet is back the new data addes locally should be pushed to the digitalocean server, you got my problem now? – youss Nov 06 '21 at 11:54
-
These solutions generally are custom tailored for each individual company. For example would having the main server in the company and just have regular off-site backups instead of a replica be an option? Does it even need to be off-site? Keep in mind that having two replicated databases is a bit problematic due to a [split brain](https://en.wikipedia.org/wiki/Split-brain_(computing)) situation – apokryfos Nov 06 '21 at 23:42