?

Log in

No account? Create an account

memcached engine 0.7, return of...

« previous entry | next entry »
Nov. 7th, 2007 | 01:29 pm

Back in April I was thinking "Excellent! I will have the memcache engine beta for the MySQL User's Conference!"

Nix that idea. What happened? We ran the first benchmark on the engine and while it did very well against other engines (aka kicked a number of their asses) it was completely unstable. The library which I had been fighting with all along that allowed me to communicate with the memcached servers leaked memory and was just too unstable.

At the time I was told that a new library was going to be made public so I shelved the project waiting for the new library.

And waited...

Finally got annoy with waiting and wrote my own (aka libmemcached, http://tangent.org/552/libmemcached.html). Which while I thought it would take me all of ten hours to write, took much longer (thanks to Remedy Tea on 15th for providing awesome green tea!). After spending a number of Saturdays working on this, and getting a lot of great feedback from users who put libmemcached to work, I've now got a good library to build from.

So 0.7 is a bit of a reboot. A new library, which is now connected into the engine. I've also added support for XML as a storage medium.

Why XML? When MySQL stores a row, I can create a binary format of a row to store in memcached. Awesome for MySQL, but it means only MySQL can talk to the data. By storing XML, MySQL and any other application can read the rows directly. I am very likely to come up with a portable binary format with a library that will allow others to use a binary format. This would be faster (and it is something I have wanted to add to Archive for a while, so it makes sense on a lot of levels). That is probably going to be one of my next projects to do.

For now though, XML will work just fine.
http://tangent.org/506/memcache_engine.html
http://download.tangent.org/memcache_engine-0.7.tar.gz

Have fun :)

Link | Leave a comment | Share

Comments {4}

XML?

from: burtonator
date: Nov. 8th, 2007 11:16 am (UTC)
Link

Yeah... I hear you about the serialization format. You want external clients to be able to manipulate the data..... but XML?

Why not just write a proprietary format.

It's going to be row data with columns anyway. Why not just length prefix all the values or maybe document your internal format?

Kevin

Reply | Thread

Brian "Krow" Aker

Re: XML?

from: krow
date: Nov. 8th, 2007 05:43 pm (UTC)
Link

By default it is the proprietary format of MySQL :)

One fellow has suggested ASN. I don't know if this is a good idea or not.

I will sit back and write in the next few weeks some sort of librowbinary which will be more efficient (I'll probably blog about its design a head of time).

The goal is to make this flexible, let multiple types flourish.

Reply | Parent | Thread

Jimi Dini

(no subject)

from: indeyets
date: Nov. 9th, 2007 03:39 pm (UTC)
Link

that first-mentioned library is this one?
http://people.freebsd.org/~seanc/libmemcache/

Reply | Thread

Brian "Krow" Aker

(no subject)

from: krow
date: Nov. 9th, 2007 05:37 pm (UTC)
Link

Yes, that is the library I had issues with.

Reply | Parent | Thread