Rick

Rick
Rick

Monday, October 28, 2013

Dreaming about Boon Object Serialization but no real need




Been dreaming up my own Boon Serialization format.
Do I need a serialization format? No.




http://en.wikipedia.org/wiki/Comparison_of_data_serialization_formats




MessagePack and Hessian are the closest to what I consider ideal.
http://en.wikipedia.org/wiki/MessagePack

I am looking for something that is easy to port to other languages like JSON and easy to explain and use.

It should be very Java friendly and very portable to Python, Go, Ruby and PHP.

It would be very, very much like JSON.

It would be very, very much like a Java version of JSON.



I actually wrote a first draft (it sucked) last Christmas. I don't know what it is about fall and object serialization. 

Anyway... it goes back to the bottom of my list again.
:)


2 comments:

  1. I really like Go's GOB format
    the actual binary output doesn't match the spec (as far as I can tell), but I like the idea behind it.

    describe the type, and then just supply an array of values tagged with that type. Allows you to remove redundant structure (ie: json), yet be fully self describing.

    messagepak requires pre-shared knowledge of the struct, making it harder for inter-language communications.
    Protobuf uses an IDL so that's kinda lame, especially with new languages as you'll be stuck with the generator

    GOB's idea with MessagePack's compactness, seems like the best of both worlds.
    the quick and dirty driver for say, Ruby / JS would be to map type def into a map.
    and on the java side, just map whatever fields are in the target class.

    GOB uses negative numbers for type def, and positive numbers for use of that type. So, maybe this is purely a protocol on top of MsgPack
    every message starts with an int, and then you decide what to do with the rest.

    either way, not suggesting you go do it. Just, your blog post triggered that "OMG, need a better serializer for streaming java / go / erlang / python / javascript" response in me

    ReplyDelete
  2. Cool. This is my third try at this. I hoping for something that is easy to implement and fairly fast and have a dynamic schema. We will see.

    ReplyDelete

Kafka and Cassandra support, training for AWS EC2 Cassandra 3.0 Training