Brian "Krow" Aker (krow) wrote,
Brian "Krow" Aker

Drizzle, Google Protocol Buffers, Low Hanging Fruit

We have been looking for a new standard method for serializing objects from the server. Schemas, Replication Events, Tables, etc... all for one reason or another have to be serialized at some juncture at the moment. Each type has its own method/language which makes it a bit of a pain to deal with in the server.


Few of the formats are upgradable. You end up with all sorts of incompatibilities that over time have become a real PIA to deal with.

Introducing Google's Protocol Buffers:

In short, this buys us an upgradable format and a lot less code. It also makes it much simple to write trivial little tools to pull apart objects from the server.

I pushed the first bit of this into Drizzle last night, and picked a low hanging piece of fruit, the schema, to do first:

message Schema {
   required string name = 1;
   optional string characterset = 2;
   optional string collation = 3;

The above was all I needed for schemas. Now out db.opt files can be upgraded as time moves on without us having to worry about the internal formats. I even wrote a 14 line piece of C++ code that allowed me to dump the files :)

It was only 14 lines because I did it in C++, I could have done it in fewer with Python :)

If you are interested in something a bit more advanced jump on the mailing list (, and comment on this:

That is the definition we are putting together for describing tables (which will give us the ability to ditch FRM and move to a discovery system).
Tags: mysql drizzle databases
  • Post a new comment


    Comments allowed for friends only

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded