Architecture / patterns for pushing live data in a client server application

I have a server that manages a complex industrial system.

We need to write a remote client that can connect to the server and "monitor" its internal state. I need to work:

  • How to set the current state when connecting a client
  • How to update the client with changes on the server.
  • Are we replicating all objects / state on the server or just a subset?

My current approach is to manually write code that monitors the changes for each object on the server and sends them as messages to the client. The client receives these messages and applies these changes to its local model.

The problem is a lot of manual coding, and I have three classes for each object: server, message, and client. Even monitoring state changes is rather laborious.

I believe that there should be a better, generalized way to achieve this?

In particular, the technologies used are: .net, C #, WPF and WCF

+3
source share
2 answers

What I am going to propose can be very difficult to modify for an existing system, but I think this is an efficient model. You can call it a "replicated model."

My idea is that your server has a model and the client should have an identical model.

, . , , , .

, , . , . :

 Hey Server, I'd like to to start replicating

 Here the current snaphot and I'll be sending you all updates after that

. , , .

, . . , . , .

, , , . chnage , .

+3

? , , , . , , .

djna - - , . .


, , - . , , ? , A, B, C D , . , .


, - , . PostSharp - , , .NET .

PostSharp INotifyPropertyChanged. , PostSharp, PropFu.

( ), INotifyPropertyChanged - , . .


. ; . ( , , , , .)

, , djna. . , , . , , .

. , , , , .

+2

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


All Articles