What is the right way to synchronize class variables across different computers?

The basic setup is that I have 2 machines running Linux, connected via WiFi. One (server) is running a thread that updates data in a class, another(client) is running a thread that reads data from the same class, and it would be nice if it could update it as well. What's the good way to handle it? My current plan is to dump the whole class into a binary file with boost serialization and just send it over UDP or something every once in a while. The problem is that the application is real-time critical and those data dumps might get quite large, even though only small part of data is updated between dumps. Is there a more elegant way to do that?
Last edited on
closed account (48T7M4Gy)
Just update the objects that need to be updated, in other objects that have changed. so that means they should be equipped via the class design(?) with some sort of archive attribute. Changing the attributes of an objects sets the atrchive attribute to 'requiring update' and on updating the attribute is reset to 'not requiring update'. ( 'synchronise' might have been a better word here than 'update'. )
Topic archived. No new replies allowed.