Reputation: 41
I am building small winform app that should support multiple instances (different locations) but the same data store. It has potential for growth so I was planing to build small platform. I don't want to make architectural mistake at the beginning, maybe if can be done better.
Current plan is to expose api that will have access to ms sql. That api will also have identity server integrated for some future initiatives. Client apps would use api to get data only if local db (sql ce) can't return results. When new record is created in local db, app should consume api to add the same record to remote db.
This seems fine but I am reading about Microsoft sync framework and it has potential. Now, I haven't work with it so I am skeptical.
Is there a better way, am I wrong about sync framework or I should stick to current api solution?
Upvotes: 1
Views: 117
Reputation: 429
There are two ways to work this out.
timer
or task
whether there is updated information and then update your UI contentSignalR
to send the information to your client (winform apps) whenever there is an update availableThe first is easier to implement abut can get slow plus the content is not live meaning there could be updated information that your winform timer has not yet requested. The second is more complex to implement (if that is your first time) but the sync is closer to instant plus it is less code-messy at the client side.
Upvotes: 0