Best practice for using CosmosDB changefeed in WPF

Kasper Mathiesen 1 Reputation point
2020-12-17T11:08:56.857+00:00

Hello

Today we use a Azure SQL database to store our orders and other data.
The Client is a WPF app, to check for changes the app is as it is now pulling the database for changes every minute.

I have been looking into changing our database to CosmosDB as the document database scheme will fit nicely with our data structure. CosmosDB has the changefeed and I would like to use that to check for changes and preferably change from a pull to a push approach for the app.

I was looking into doing it serverless and then us Azure functions to get the changes from the change feed and then use SignalR to push the changes to the app.

Now my question, is this a good approach, and also what happens if the user hibernates his PC and then starts it up again, will he then get all the changes that has happened since last or do I need to use another approach?

If this is a good approach is there any good guides for using Azure SignalR in a wpf app, I can only find for using it on ASP, and also alot of them seem to be outdated.

Thanks.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,110 questions
Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,784 questions
Azure SignalR Service
Azure SignalR Service
An Azure service that is used for adding real-time communications to web applications.
147 questions
Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,672 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Navtej Singh Saini 4,226 Reputation points Microsoft Employee
    2020-12-22T23:49:49.237+00:00

    @Kasper Mathiesen

    Here is what our Product teams has replied:

    "Regarding the query, it is quite high level – so although it looks a “good approach”, there are still a lot of design decisions that the customer could take that could rapidly turn it into a “bad approach” 😊
    That said, at a high level, it seems customer has decided that data structure fits well with a document oriented database, and seems to have identified a pretty good use case for Change Feed."

    Here we will advise you to create POC and check the use case is working for you before you move to doing the same for production.

    Thanks
    Navtej S


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.