locked
Two-Way Synchronization between Azure SQL and wpf/uwp clients RRS feed

  • Question

  • I have a Azure SQL database, and then clients (UWP and WPF) running SQLite that gets data from the database.

    The clients can change the data and it updates the Azure SQL rows and they can insert new items/rows.

    My problem is that multiple clients are working at the same time and i would like the client to update as soon as there is a change (insert/update/delete) on the Azure SQL database. Today the user has to press update in order to get latest.

    However I not sure how to implement this.

    I have been looking into using SQL "Change Tracking" https://docs.microsoft.com/en-us/sql/relational-databases/track-changes/about-change-tracking-sql-server?view=sql-server-2017and can easily active Change Tracking in Azure on the SQL server and Table, however i cannot find any documentation on how to use this to sync to client in C#, is there some?

    Maybe there is a better way of doing this?

    Any input is much appreciated.

    Thursday, May 23, 2019 7:14 AM

Answers

  • The following reference architecture for the network layer where Express Route is an additional service for high-speed bandwidth between on-premise and Azure but is not necessary. The key part of this is the VPN Gateway and connecting the on-premise address space with the Azure VNet address space over a secure connection.

    Azure SQL Managed Instance (IaaS presented as PaaS) is the natural choice here for the database platform, as it deploys in a VNet and can only be accessed via a private address. Azure SQL Database is a PaaS service that is published via a Public IP and can be access over the internet or added to a VNet. Please see this doc for more information with regard to the differant deployment options.

    The difference here is that if you go with a VNet, remote users will be required to access your on-premise network to access the database instance. 

    Without the VPN Gateway + VNet, all users will access the database over the internet with an encrypted connection. 

    Please continue to ask questions if you need additional details. Please mark this as answered if the information helps you with your solution.

    Thanks!

    Thursday, May 30, 2019 10:38 PM

All replies

  • Hi Kasper,

    Th SQL Change Tracking solution means that SQLite in your solution is going to cause out-of-sync issues and will likely needs to be removed, and the clients make direct calls to the Azure SQL Database.

    Is there a requirement for it? Where are your clients located, is a centralized office on a LAN or are they clients global?

    Thursday, May 23, 2019 8:46 PM
  • Hello Mike

    Thank you for your reply.

    Understood and the SQLite client database can of cause be removed if needed.

    The client software is mainly used in a centralized office but is also used by people working from home.

    How would you go about implementing that though?

    What om looking for is some documentation that shows how to implement this client side in c#, I have not found any.


    Monday, May 27, 2019 9:58 AM
  • The following reference architecture for the network layer where Express Route is an additional service for high-speed bandwidth between on-premise and Azure but is not necessary. The key part of this is the VPN Gateway and connecting the on-premise address space with the Azure VNet address space over a secure connection.

    Azure SQL Managed Instance (IaaS presented as PaaS) is the natural choice here for the database platform, as it deploys in a VNet and can only be accessed via a private address. Azure SQL Database is a PaaS service that is published via a Public IP and can be access over the internet or added to a VNet. Please see this doc for more information with regard to the differant deployment options.

    The difference here is that if you go with a VNet, remote users will be required to access your on-premise network to access the database instance. 

    Without the VPN Gateway + VNet, all users will access the database over the internet with an encrypted connection. 

    Please continue to ask questions if you need additional details. Please mark this as answered if the information helps you with your solution.

    Thanks!

    Thursday, May 30, 2019 10:38 PM
  • Thank you Mike, I will give it a read through and revert if further questions.
    Monday, June 3, 2019 10:19 AM