mercredi 13 juillet 2016

Offline - Online sync in CQRS after reconnect

My question about CQRS and Offline access. I have found several articles and hopefully it's possible to use CQRS with Offline access. But I can't figured out how to apply best practices to my case.

My case: I have WPF client application and server with web ui. WPF app is basically for setting states of work progress (for example 'In Work', 'Todo', 'Done', ...) WPF client most of the time doesn't have it's own states, all data published directly to the server through CQRS commands in real time. The server has commands handlers and event sourcing. Sometimes WPF app may lose connection and should work in Offline mode.

So here is my questions: 1) can I apply CQRS to WPF app and use server commands handlers running in WPF app during Offline mode? I mean can I reuse this handlers classes in WPF or I should create another handlers classes in WPF? 2) after reconnect WPF app should send batch of data to the server. Should it send CQRS Commands or Events? Or it should be another command like 'ReconnectToServerCommand'?

Thank you for help!

Aucun commentaire:

Enregistrer un commentaire