Sync SQLite with SQLServer using Sync Framework

I am trying to make an online application that can synchronize a SQLite database running on an Android device with SQL running on the server. We have a corporate application running on .NET and Android; we need to synchronize their data in order to maintain consistency. It will be bi-directional synchronization: any data changes that occur (either on the client or on the database server) must be synchronized.

I saw that this can be achieved using many approaches, but I recommend using the Microsoft Sync Framework for this scenario, since it automates the synchronization process and can be convenient. I did some research on using the Sync infrastructure and found some samples on the Microsoft website. But basically they do offline synchronization: they basically do synchronization on the desktop, where the source and destination databases are on the same machine. But for my scenario this is not the case. I have SQLite on the client machine and SQL on the server, so the online synchronization process is needed here.

How do I achieve this?

+6
source share
2 answers

they are sample applications, so for simplicity they simply specify both source and target databases locally. there does not stop you from reassigning connections to the remote server.

instead of looking only at the Sync Framework SDK, look at the Sync Framework Toolkit instead. This is one that accesses client platforms other than MS.

0
source

Microsoft Sync services work with any data source that can be connected by the ADO.NET data provider. You will want to see how to synchronize between peers. The rules for the Microsoft Sync Framework are stored in the SQL Server Compact Edition database and must be located on the SQL Server side, and most likely you will synchronize over a network connection (Internet), so you will need to configure the web server and web services to activate the agent Android sync. Creating an agent and synchronization adapters will be quite time-consuming. Luckily for you, enterprising developers have already done this work: https://ampliapps.com/sqlite-sync/ There are other tools like the one I published, and for the sake of transparency I am not interested in Ampliapps, I just know them product,

0
source

Source: https://habr.com/ru/post/922191/


All Articles