Skip to content

Incremental serialization #9

@jankotek

Description

@jankotek

From email at Kryo mailing list:

My use case would be a large-ish (several GB) in-memory state that needs
to be saved periodically (every five minutes or so). No in-place
updates, new state is generated from scratch (but a large amount of
substructures are supposed to be shared with previous state).

So the object graph has new root on each update and data are immutable. Now it makes sense.

In theory it could be handled the same way as circular references.
Serializer would save its state (IdentityHashMap) between updates.
On next update serializer would just continue with original Map and
replace objects from first version, with their pointers.

There are two problems:

  • memory overhead of keeping IdentHashMap 30% extra references?
  • IdentHashMap would prevent GC, so weak refs..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions