+1 I think we should make the default serialization mechanism to be PDX. We should not concern ourselves with Java serialization at all anymore.

+1 pdx-read-serialization=true ... I think we should prefer PdxInstance objects over customer POJOs. I think that customers would be ok to run PdxInstance.getObject() to get their pojos when required. But maybe to start having customers use a more "optimal" serialization mechanism and approach, a slight nudge into the PDXInstance direction is not that bad.

In addition to that, it might help if our own code expect PdxInstances over Pojos.

--Udo

On 3/27/17 12:58, Swapnil Bawaskar wrote:
I believe it would be much better user experience if we just serialized
user's domain object without requiring the user to configure anything.
Currently, we require that the user specify that they want to use the
ReflectionBasedAutoSerializer and the pattern that matches the domain
objects.

Looking at this code
<https://github.com/apache/geode/blob/8bf39571471642beaaa36c9626a61a90bd3803c2/geode-core/src/main/java/org/apache/geode/pdx/internal/AutoSerializableManager.java#L213>
it
looks like the pattern can be made optional. Also, we can go ahead and
configure ReflectionBasedAutoSerializer to be set by default on Cache
startup (if one is not specified already). We should also set
pdx-read-serialized to true in this case.
For advanced use cases where the user wishes to exclude certain fields,
they can specify the pattern.
If the users are using DataSerializable, that should still take precedence
over PDX, so we won't break existing users.

Are there any major concerns around this approach?

Thanks!
Swapnil.


Reply via email to