Slide 26
Slide 26 text
26
Transaction Object Lifecycle
• When batch size is reached, or after timeout, serialize transactions*
‒ Serialization with DSL JSON (https://github.com/ngs-doo/dsl-json)
‒ Zero garbage, no intermediate string representation
‒ Serializes directly into OutputStream of the HTTP request body
‒ Custom garbage free serializer for ISO timestamps
‒ JSON is GZiped
• Reset the Transaction object and put it in back to object pool
‒ Transaction is fully mutable
‒ Resets all referenced objects
‒ Immutable Objects can't be reset and create garbage
‒ Favor long timestamp over immutable Instant
‒ Avoid java.util.UUID
‒ Favor primitive types over boxed (int vs Integer)
5
6
*subject to change, we are working on a more efficient streaming-like protocol