Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance PDX serialization support to delegate back to Geode for Session attribute value serialization #24

Open
jxblum opened this issue Feb 6, 2019 · 1 comment

Comments

@jxblum
Copy link
Contributor

jxblum commented Feb 6, 2019

Currently, Spring Session for Apache Geode/Pivotal GemFire (SSDG) supports delegation when using Data Serialization to serialize both the Session and the Session Attributes along with the corresponding attribute values.

This gives users the ability to apply GemFire serialization semantics to their own application domain object types. However, the same strategy is not applied when using PDX Serialization to de/serialize the Session and its contents.

This ticket sets out to enhance SSDG's PDX Serialization to support delegation.

@jxblum jxblum self-assigned this Feb 6, 2019
@jxblum jxblum modified the milestones: 2.0.9.RELEASE, 2.1.3.RELEASE Feb 6, 2019
@jxblum jxblum removed this from the 2.1.3.RELEASE milestone May 29, 2019
@jxblum
Copy link
Contributor Author

jxblum commented Nov 22, 2019

It turns out, Apache Geode (and by extension, Pivotal GemFire & Pivotal Cloud Cache (PCC)) may very well delegate to the PDX serialization mechanics to serialize objects passed to PdxWriter.writeObject(..).

I initially thought this was not the case because the Session Attributes were 1) first, encapsulated in a java.util.Map object (as seen in the custom PdxSerializer, the PdxSerializableSessionSerializer, used to serialize the Session object using PDX) and 2) the moment Geode processes a java.io.Serializable object (e.g. like java.util.Map), and the Serializable object's type (e.g. again, Map) is not PdxSerializable (which a java.util.Map would not be), nor is there a custom PdxSerializer registered with the cache that knows how to serialize the object (e.g. again, a Map), then Geode would uses Java Serialization to serialize the Map and its contents.

However, I was informed that Geode identifies Collection objects (like Map) and inspects their contents. So, it may be the case that Geode will serialize objects (values) in the Map (which would be the case for Session Attributes in the Spring Session object) when the Map object is passed to PdxWriter.writeObject("fieldName", mapObject).

I need to investigate the logic in PdxWriter.writeObject(..) further (and again) to verify.

@jxblum jxblum changed the title Enhance PDX Serialization to delegate back to GemFire for Session attribute values Enhance PDX serialization support to delegate back to Geode for Session attribute value serialization Jun 5, 2020
@jxblum jxblum removed their assignment Aug 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant