Serialization: A New Hope
summary
Proposes replacing Java’s magic serialization with a data‑oriented pipeline that uses constructors and deconstruction patterns and simple annotations like @Marshaler/@Unmarshal to declare entry/exit schemas; produces a Marshal structural representation (owner, parameter names/types, values) that is IO‑agnostic and converts to wire formats (demo via a small Jackson adapter). Prototype (≈1,300 LOC) recursively marshals graphs but does not support cycles, preserves constructor validation, allows one canonical marshaller per type, and is meant to be phased into the JDK.
AI-written summary · about
chapters (13)
- 0:00The history of serialization
- 3:01Why serialization is flawed
- 4:28Seeking a better solution
- 7:00Records and deconstruction
- 10:04Cycles and virality issues
- 14:39A new design approach
- 17:01Using language constructs
- 22:41Class author control
- 26:44Design choices and benefits
- 29:09Decoupling concerns
- 34:06Recursion and security
- 37:29Simplicity and takeaways
- 43:53Next steps and Q&A
related talks
49mMarshalling: Data-Oriented Serialization
41mHigh-Secure Java Serialization
34mWhen Records Meet Serialization A Happy Tale
53mWhy We Hate Java Serialization And What We're Doing About It
41mJava Serialisation: A Modern Fairytale
42mSerialization and Object Graph Communication
45mSerialization & Object Graph Communication
51mAsk the Architect
