Migrating from parse.com - parse-platform

Say I have 10K users for my app and I want to switch to my own custom server for backend. I have seen the Parse export functionality but I don't get how it can help me in this situation.
I mean even if I export all data and make updates to app so that it makes calls to my new custom server, still, it will take months for all my users to use updated version of app(many users don't update immediately, my last update on fb was year ago).
Also, during this transition half of my users would be having their
data on my custom server and other half(those who haven't updated)
would be using parse server, so for queries that require all data in one place this becomes an issue (I could solve this via replication but imagine how slow it would be in realtime to push the data to both - my server and parse.com).
Has anyone thought about this ?

What you could do is when you release a new version of your app, when a user logs in and they are on parse, migrate their data at that point to the new server and from that point on that user uses the custom server. That way users move to the new server as they upgrade, I always have a flag that is fetched from my server to force the user to upgrade if is needed. Hope that helps.

Copying data over to your new backend periodically until you have finalize your mobile client code and then allow the user to update their app on the App Store or Google Play Store would provide the switch over. Doing that elegantly would be dependent on the type of app and user base you have for the app. I wrote up a part 1 of a blog on these considerations for migrating over from Parse to Couchbase Mobile stack and the reasons why to consider the stack.
If you can already attach a new system in place to have new data in two places (Parse and customer backend) then the copy and merge in the future might be easier to handle but this is case by case. Then when on mobile app update, you can depreciate the server. Or push data to have local store for those users who will be on older versions since Parse will eventually stop working. Any new experiences will require update to the new App version.

Related

How to sync database with remote database with Dexie

I making Notes PWA App that work offline and online.
I am saving notes records on IndexedDB with Dexie.js. I am using Quasar as frontend and backend as Laravel 8.
I want to sync IndexedDB Database with remote database. How can I do?
Look at Dexie Cloud - David has worked this out for Postgres.
If you want to write your own, it is a LOT MORE WORK than you think.
We wrote our own to work with SQL Server and C#
(it is proprietary, I can't share it)
Months later, we are still finding edge cases - there are many edge cases.
If you still want to write your own, you are probably mistaken..
If records can be created client side - use GUID identifiers
If it is an existing database with integer identifiers, add a GUID identifier field.
Set aside a few months of time to work out the rest.

Best way to open an internal project to world as a Saas

We have developed an internal crm and used it for the last months. Now we have decided to open it to the public as a Saas project and I'm wondering which is the best solution to upgrade the database structure that actually is made for only one company and expand it to be able to manage multiple paying customers.
At the moment the scheduled solution is to add a "customer" field to every column in the database and upgrade the backend logic to use this field.
Are there more elegant solutions to this problem?
The database is mySql and the backend is made with laravel.
CRM Data can be very sensitive and you need to be extremely careful not to "leak" data to wrong customers.
For an existing app, I would argue for a system to create fresh DB for each customer.
You would have 1 codebase that connects to customer specific DB.
This way you dont need to change too much in your current DB structure, but "just" implement the mechanism to use the correct DB according to customer account.
This is how I would do it :
In any wah this is a massive paradigm change from an internal app to a SAAS platform app, and you should identify the necessary steps to go through to achieve the desired result.

Xamarin - How to render list in backend

Currently I have an application which displays a list of items that when selected by a user it opens said item in the default browser on the mobile device they're using.
Currently because the items are hardcoded into the mobile app using the Xamarin platform then a new version of the app is needed to be released/deployed to every device when wanting to update.
I was wondering if anyone could provide me with any documentation/ideas on how I would be able to carry out adding more items to the list (preferably in a better UI than just a standard list) without having to release a new update.
Some ideas which I have thought about:
Using a CMS - to control the links that need to be open
SQL Lite - Create simple db with item name + url then call the url in the table (then somehow when I update the db its pushed into the app)
Using a cloud service such as Azure to do a similar function as above.
This question is vague, but if someone can point me in the correct direction.
That would be fantastic.
Depending on your knowledge, i would go with Azure or Parse Server and deploy the url's there. Each time you open the app it will fetch the links from the remote server. Both Azure and Parse provides caching so you wont incur any network traffic.
It will also depend how frequently you update the links, if you update them often then go setup Azure and Parse. If you rarely update the links then you can setup a local SQLite database and have a way to check from a remote server if there are any new links available, it they are there then you can pull them into your local SQLite database.

Client Side Transactions in Azure App Service Offline Sync

Is it possible to leverage transaction on the client, when using azure app service offline sync?
It seems to me that you can pretty much only insert into the SQLite store a record at a time, but ideally i'd like to be able to commit multiple records in a transaction.
I'm using Xamarin with Android right now,but will be also supporting iOS.
Thanks
Matt
Unfortunately, on Windows, Xamarin, and Android you can only commit one record at a time on the local MobileServicesSQLiteStore. This is because changes need to be made one at a time using methods like SyncTable.UpdateAsync, which is how you mark a change as being tracked to send to the server.
On native iOS, the Mobile Services offline sync feature uses Core Data, which does support a form of transaction (https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/CoreData/Articles/cdMemory.html). If you use these APIs, you still need to make calls to the Mobile Services SDK methods to track each individual change in the internal tracking tables.
Why do you need transactions on the client side? There might be a different way to achieve your goal.

Xcode - Simulating an update of data in applicationWillEnterForeground

I'm doing a check for updated data from the web in -applicationWillEnterForeground: but how would I test this in the simulator? I have no control of when the updates from the web are made so I need to trigger an update myself within Xcode when it's already running in the simulator.
I need to some dynamic testing so to speak.
Not suer by what you mean by 'check for updated data from the web' though sounds like you are getting refreshed Data from a WebData source. Can you Simulate that Web Data source? There are many WebServers you can install that you can create a Quick page to send you back Data when you query it. We do this with our App. Ultimately we will be querying our Ultimate Web Data, but while testing we simulate the data on the web with our own web server. A few pages in the background and you can have it return you the data that you need. We use XML of the communications back and forth.
Then once we go live, we switch the web server name and we are good to go.

Resources