Java – keep remote objects updated

Two objects a, B with the same class (such as hashmaps)

On different computers connected to the Internet

One (a) is the source and the other (b) is like an updated copy

Is there a standard / recommended way for them to "connect" or "update"?

example

I am using TCP connection and writeobject

This is the case with replicas

However, this can cause the problem that the entire object is sent every time it is synchronized (for example, periodically or every time it is modified)

I want a way to send only differences (especially useful for Java collections), but at least it's not easy to know the differences

I think there is such a thing (too simple / optimistic scheme)

On server source

Copy on client

Is that so? So here I am, trying to avoid reinventing the wheel

Thank you for reading

Solution

It sounds like you might benefit from distributed hash map( http://en.wikipedia.org/wiki/Distributed_hash_table ).

There are many frameworks that provide this functionality – http://code.google.com/p/hazelcast/ This is an example

Take the obvious risk – if your update rate is high, you can consume a lot of bandwidth to keep the two synchronized

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>