2

we need to design web and mobile app solution for a client. the requirements are following Application with offline capabilities, that will sync with cloud when you reconnect to the internet, but the database should be accessible while offline. Sync button is a must, client will be visiting some locations that don’t have internet access, and will require most recent data

  • handle it in code. use sqlite or similar on the device, sync it with online service via REST or SOAP, etc. – ivanivan Jan 13 at 16:47
0

Try Akeeba Backup.

From their site (Akeeba Solo):

One click backup That's all it takes to create a full site backup. The archive includes your database, files and the restoration script.

You can choose whether to backup only database or only files using pro version.

I believe you won't come across critical problems if you set permissions of all "cache" and "tmp" folders to 777.

The backup files can be automatically downloaded easily I guess. Hope this helps.

0

The standard databases like mysql and mariadb also offer sockets connections.

Some distros its located here: /var/run/mysqld/mysqld.sock

PHP

$link = mysql_connect('localhost:/var/run/mysqld/mysqld.sock', 'mysql_user', 'mysql_password');

Also 127.0.0.1 or its alias localhost is also present whether or not your actually online, and you can use that to connect to the database.

You might have to change the my.cnf to allow connection on 127.0.0.1 on some distros.

When they are online you write code to sync the database.

0

I don’t know about IoS, but Android (and browsers) is very friendly to Sqlite . Just checked, IoS too.

While I generally use MySQl (or MariaDB), as suggested by @cybernard on the server, you are talking client side here.

Sqlite is … well, errm, … lite.

  • It uses fewer resources
  • It is a single executable, almost certainly already present on any smartphone, as browsers use it for local storage
  • It is also a library, which can be linked with an executable, to allow you to distribute a single file
  • The database itself is a single file, so backups can be easily made by just copying that file.

So, I assay definitely Sqlite for the client side. You can sue it server side too, although you could go with MyDSql/MariaDB there, if you prefer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.