kdar / storable

Shallow implementation of writing perl storable data
MIT License
5 stars 1 forks source link

Storable? #1

Open tsee opened 11 years ago

tsee commented 11 years ago

This is a wishlist/discussion item, not a bug report.

Storable is a data format that is specifically meant to handle ANY Perl data structure. Its actual protocol is weakly defined by its implementation and specifically wed to Perl. That particularly includes serializing the full state of Perl scalars (so all of its integer, float, and string values if they're defined) and that just simply doesn't map gracefully to other languages. It's also not very graceful to upgrade.

Not to toot my own horn, but the Sereal serialization protocol was designed to handle virtually all of Perl's data structures while being a relatively well defined protocol that at least allows for basic language interoperability. Maybe that is a better target? On top of that, our Sereal reference implementation for Perl is vastly faster than Storable and uses a fraction of the space/bandwidth.

Sereal announcement: http://blog.booking.com/sereal-a-binary-data-serialization-format.html Sereal repository: https://github.com/Sereal/Sereal

kdar commented 11 years ago

The point of this library was not purely interoperability with perl, but with other perl libraries/protocols that use perl's storable for storing their data (for example TheSchwartz).

There are many serialization formats that are cross-language that I would consider if I just wanted interoperability.

tsee commented 11 years ago

On 01/30/2013 01:09 AM, Kevin Darlington wrote:

The point of this library was not purely interoperability with perl, but with other perl libraries/protocols that use perl's storable for storing their data (for example TheSchwartz).

There are many serialization formats that are cross-language that I would consider if I just wanted interoperability.

Good luck, then! My learned opinion is that it would be easier and less painful to change the serialization method of TheSchwartz or other systems then reimplementing a useful subset of Storable.

Best regards, Steffen