.net - Architecture/patterns for pushing live data in client server application -


I have found a server that controls a complex industrial system.

We have a remote client that can connect to the server and "inspect" its internal status. I need to work out:

  • When the client connects How to install an existing status
  • How to keep customers updated with changes on the server
  • Do we copy all the objects / state to the server, or just a subset?

My current approach is the handwriting code that sees the change in every object, sending them to the server and the client as a message. The customer receives those messages and applies those changes to their own local model.

The problem is that there is a lot of manual coding involved, and I have three classes for each unit: server, message, and client

I think getting it Should be a better, generalized way to?

"Text">

What am I suggesting, can be very difficult to return to the existing system, but I think that this is an effective pattern, you can call it a "replica model".

My idea is that your server has a model, and the client should have a similar model.

Access all updates of the server model as if the events that are applicable to the model are now made available to those events, then we can send them to the client too, and it will look at the same update.

This is simple in the initial phase of the client and the server model, if we also make the model serial. The customer now goes with the timestamp mechanism:

  O server, I want to start copying  

goes to the server

  This is the current snot and I will send you all the updates after that  

There are so many wrinkles in it. For example, if the message is lost, how to come back once again. Please.

The main thing is that the model must decode with the other code in the server. This section should not mention the processing classes. Instead, it should emit events if it is to trigger this work then there are things in the server, but the events of these work are only ignored in the client.

The advantage of this approach is that once you replace replication maturity, there is almost no maintenance in the form of a model change. Provided that all model squares and chronograph events are serialized, then runs the same code in the server and the client.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -