I need to create a CRUD in Flutter that connects to an online database but if it loses the connection it can work with a local database but when recovering the connection it can send that data to the online database How can I do it ?
There is a dependency to check the Offline online status of the device in flutter
flutter_offline
You can use this dependency and based on the status you just call CRUD operations server/local
Here is the sample application where it will check the online offline status of the device
you must have an offline database like Sqlite and an online database with similar structure. you can check the internet connection and when user is offline, do crud with offline database and when user comes online, read database and send changes to your server database.
Related
Currently I'm working on a project where we use React, PWA, PouchDB and CouchDB to build an offline first application with a large amount of data from the remote database, stored in the client web browser.
In other words a local database of around 2GB is stored in the client through IndexDB storage.
There is a significant problem on the replication of the remote database when starting the application and building the local database. PouchDB takes too long to do this process, there is a thread speaking about this topic.
pouchdb replicate from couchdb : very slow
Apparently there is no way to speed up PouchDB in the level that we need for the project. Therefore we have considered other options for a local database in the web browser with synchronization to a remote database. Some of the options we have considered are AWS Amplify Datastore, Firebase Cloud Firestore and Minimongo.
The company I work for is strongly linked with Azure services, but I have not found any like service in Azure that stores large amounts of data in the client web browser and synchronizes with the remote database.
Does anyone know of an Azure service that can help with this project?
If not, is there any other option or architecture even if not Azure, that would be recommended. We already have a functional web application with React, PWA, CouchDB and PouchDB, this is NoSQL, so NoSQL options would be preferred, but I'm open to consider SQL Database options even though a bigger modification would need to be done in the program.
Thank you in advance !!
I would like to provide my users with a session or workspace using Azure SQL DB where they can take a snap shot of the database and cook up their changes, analyze the result and then submit the final changes, so that all the other users can see it.
Do you think if the Temporary Tables in SQL Server is the answer?
Do we have some middleware in the market which can be used on top of SQL server to create sessions, manage sessions and post the session data back to master DB version with proper Reconciliation of data between the version created by user and the current master version of DB?
I have seen a middleware ArcSDE from Esri which used to do it for complex Geodatabases but I am struggling to find similar Middleware for normal Azure-SQL RDBMS.
In my app I have SQLite database. I want to introduce sync between devices of my users.
I want to combine my local SQLite db with cloud Firebase db.
I want my sqlite database to be stored on firebase database when the users are logged in otherwise let it store offline. Any changes to the local database should be reflected on firebase database when logged in. Also if user deletes the local database he/she can retrieve it from firebase database. I just want to use firebase for the synchronization between local database and firebase database.
But i have no clue how to do it. Can anyone please help me with this? My app is in android with java as a backend.
Rather than storing the sqlite db onto firebase db, you can store the data present in the firebase db based upon the user. when User is performing any operation then store it in local db (sqlite) as well as the firebase db. This will help you to show the data when user is in offline mode. When users has logged out. Delete the local sqlite db and if the user has logged in with the user which already has the data present in the firebase db then sync it with local db.
This will be much easier for you to provide sync between the local sqlite db and firebase db.
If you are providing multiple sign in then you can implement the FCM to provide the sync if data has been changed and update the local db accordingly.
Thank you,
Hope it helps
I am working on a phonegap project to build a cross platform mobile app, and came to know from a website that the app's database can be deployed/built with "database.com".
The procedure is well explained but I have one question -
how to sync the database available on database.com with a database on a local server?
i.e. for e.g., if a client has his database (of his desktop application) on his local server and he requires a mobile app of the same now, what is the procedure to be followed in "database.com" to sync his server's database with the database on "database.com"?
PS: I need to use "database.com" for my database because I want to maintain it on cloud, and I do not have capability to maintain a local server.
You might need a service for data syncing if it is to be more than once. I work on a project that does exactly this.
www.overcast-suite.com
Otherwise, model your tables to Salesforce Custom Objects, export the data on the local server to CVS and use the Data Loader to import.
HI all,
I had created a app(a Product to be sold to many users) which is almost complete, now I have a tough task to sync the app with the website, which will be used to manage the data for all users. So it is quite obvious I will have to update the database that will reside on web server from the users desk through the app it self. Lets say I just want the users personal data to be stored on the DB on web server and anytime they update it in the app that should reflect on website as well(meaning the data on DB on webserver should be updated)
ANy ideas for doing this in best possible way, also this is just the example I will need to update heaps of data from users desk. I am already streching my hair thinking of managing data on server, can any one please advice here.
Thanks and Regards
Nirav
You can write a update engine to upload users data to web server database.I had a exprience with Sql server replication on windwos XP and have some trouble and final I decided to develop a windows service that can do it.