Drizzle, Google Protocol Buffers, Low Hanging Fruit
« previous entry | next entry »
Aug. 12th, 2008 | 01:09 am
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.
Worse?
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:
http://code.google.com/apis/protocolbuf fers/
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:
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 (https://launchpad.net/~drizzle-discuss/ ), and comment on this:
http://drizzle.wikia.com/wiki/Table_Pro to_Definition
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).
Worse?
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:
http://code.google.com/apis/protocolbuf
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 (https://launchpad.net/~drizzle-discuss/
http://drizzle.wikia.com/wiki/Table_Pro
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).
(no subject)
from:
petdance
date: Aug. 12th, 2008 03:20 pm (UTC)
Link
If you'd done it in Perl, you'd only have had to wiggle your noise and blink hard.
Reply | Thread
(no subject)
from:
krow
date: Aug. 12th, 2008 03:34 pm (UTC)
Link
Reply | Parent | Thread