Re: Custom Java serialization and BinaryMarshaller

2015-12-15 Thread Vladimir Ozerov
Dima, As class can "migrate" between caches, we should have only single write logic across all caches and nodes. For this reason it is better to place this flag in BinaryTypeConfiguration. Regarding OptimizedMarshaller - the sole purpose is consistency. If class cannot be written with BinaryMarsh

Re: Custom Java serialization and BinaryMarshaller

2015-12-14 Thread Dmitriy Setrakyan
Vova, I think I am beginning to see your point. However, my concern is that users may wish to ignore Externalizable and use the Binary protocol. Is it possible to have a configuration flag on per-cache basis? Also, why delegate to OptimizedMarshaller for Externalizalbe classes? Can’t we have this

Re: Custom Java serialization and BinaryMarshaller

2015-12-14 Thread Vladimir Ozerov
Dima, I do not think it is possible to get list of such classes because this can be any class from any library. Can you explain what is your concerns? On Tue, Dec 15, 2015 at 1:46 AM, Dmitriy Setrakyan wrote: > Vladimir, > > I am not sure I like the approach you are suggesting. I am thinking th

Re: Custom Java serialization and BinaryMarshaller

2015-12-14 Thread Dmitriy Setrakyan
Vladimir, I am not sure I like the approach you are suggesting. I am thinking that by “unstable” classes you are referring to classes like HashMap or ArrayList, in which case, providing field metadata for them does not make sense, as well as deserializing them on the server side does not make sens

Custom Java serialization and BinaryMarshaller

2015-12-14 Thread Vladimir Ozerov
Folks, Currently BinaryMarshaller works in a very non-trivial way: 1) If class is Serializable or Binarylizable, it is written in binary format and can be used without deserialization. 2) If class implements Externalizable, it is written in binary format, but without fields metadata. 3) If class h