[infinispan-dev] Findings of ISPN-508 - Portable serialization marshaller

Galder Zamarreño galder at redhat.com
Thu Jul 22 06:10:53 EDT 2010


On Jul 22, 2010, at 10:38 AM, Emmanuel Bernard wrote:

> 
>>>> The OGM code that deconstructs the object works on a java object (e.g. Person). To be able to use this Person from C++ you'd need to have C++ code to assemble the AtomicMap (i.e. C++ OGM), or?
>>> 
>>> Yes
>> 
>> Yeah but does not need to be anything complicated. On the client side, it'll be just a custom type that looks exactly like a Map. The difference comes when in the server this is converted into an AtomicMap vs a HashMap.
> 
> The serialized conceptual structure of a HashMap is different from the serialized structure of an AtomicMap? Why?

Depends how you look at it :)

If you're replicating an AtomicMap to another node in the cluster, we only send deltas around. That's what ReplicableCommandExternalizer does. So, only the stuff that has been modified in the map are sent.

Now, if we're marshalling to a cache store, we store the underlying map that AtomicHashMap uses, because the cache store would not know how to update the deltas in the map. The same thing would happen with a Hot Rod client, it would just send us the underlying map's entries. 

At the end of the day, AtomicMap is a map wrapper that allows to track changes to individual deltas and it's treated as an atomic entity.

> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache




More information about the infinispan-dev mailing list