Coder Social home page Coder Social logo

Schema evolution handling about pickling HOT 7 OPEN

scala avatar scala commented on September 27, 2024
Schema evolution handling

from pickling.

Comments (7)

crumbpicker avatar crumbpicker commented on September 27, 2024

+1
Maybe Option could be an option ?
I hope there will be support for this.

from pickling.

guersam avatar guersam commented on September 27, 2024

Probably already checked, but FYI just in case: Schema evolution in Avro, Protocol Buffers and Thrift

from pickling.

phaller avatar phaller commented on September 27, 2024

At the moment it is necessary to create custom picklers to deal with schema evolution (for example, a custom pickler could unpickle older versions of a message, but create instances of newer versions).

However, it is possible to create new pickle formats which are more evolution-friendly, for example, by including something akin to Protobuf's field tags (the blog post linked above explains well how these tags help with schema evolution). Adding an evolution-friendly variant of the binary pickle format would be very useful, indeed.

from pickling.

guersam avatar guersam commented on September 27, 2024

Thanks for your advice, @phaller. At least, default parameter support will provide some basic compatibility out of the box, but it seems difficult without additional annotation until SI-5920 is resolved.

I decided to go with Protobuf for now but will keep eyes on Pickler looking for what I can contribute.

from pickling.

adamdecaf avatar adamdecaf commented on September 27, 2024

Since 0.10.0 came out I was looking at pickling for use to persist messages and was thinking about how schema evolutions would happen. Sadly this test I wrote didn't pass, but I'm mentioning it here to see if now that some of those PR's in the SI have been merged if it's likely for pickling to have support for handling default methods. It looks like it'll be fixed in scalac in 2.11.6?

https://github.com/adamdecaf/pickling-migration-test/blob/master/src/main/scala/Add.scala

Deleting fields works though!

from pickling.

havocp avatar havocp commented on September 27, 2024

In https://github.com/sbt/serialization we support Option fields that can be missing.

from pickling.

pjan avatar pjan commented on September 27, 2024

It would be totally awesome if schema evolution came about. It currently is the thing keeping us back from using pickling. @adamdecaf's outlined usecases pretty much sum up the hoped-for functionality for now.

protobuf/avro/thrift was mentioned before, but it is just not cutting it in a pure scala-based environment due to the lack of support for e.g. polymorphism, drastically cutting down the flexibility that scala offers.

So, very keen to get an update on this 😄

from pickling.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.