Skip to content

Conversation

@theigl
Copy link
Collaborator

@theigl theigl commented Dec 16, 2022

This is a POC for moving record serialization from RecordSerializer into FieldSerializer.

This approach has two main advantages:

  1. Existing configuration options for the FieldSerializer can be used for records
  2. Sub-classes of FieldSerializer (Compatible, Versioned, Tagged, ..) can be adjusted for records

JDK 17+ is required for this PR so it is a likely candidate for the next major version.

@theigl theigl changed the title [POC] Record Field Serializer [POC] FieldSerializer for Records Dec 16, 2022
@theigl
Copy link
Collaborator Author

theigl commented Dec 21, 2022

See #884 for the discussion about RecordSerializer vs FieldSerializer for records.

…izer

# Conflicts:
#	test-jdk14/com/esotericsoftware/kryo/serializers/RecordSerializerTest.java
…izer

# Conflicts:
#	.github/workflows/pr-workflow.yml
@julianhowarth
Copy link

Sorry to jump on a PR - let me know if I should post somewhere else.

I'm currently looking at serializing records with Kryo with the requirement that I have forward/backward compatibility. I've tested using this branch and it does exactly what I need, so I'd like to know the best way to move forward:

  • wait for the next major release which includes this change, but I haven't seen anything published as to when that might be
  • fork the repo and build my own version separately but I'd rather avoid this if possible
  • extract the record serialization and create a separate serializer I can use for records, with the intention to remove it when the next major version is released

I appreciate any advice on the best way forward

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants