Afternoon's Toy, memcache as an engine
« previous entry | next entry »
Aug. 26th, 2006 | 03:50 pm
location: Alohahaus, Seattle
Got up and went walking this morning. This is probably going to be one of the last few good weekends here in Seattle, and I wanted to make sure that I got in some walking each day.
Came home to discover that Christine had been stung by a Yellow Jacket. Despite the full can of Yellow Jacket killer I sprayed into the nest last night, they seem to be quite alive. I am tempted to run to the store and get some of the instant foam I use for sealing insulation leaks. I wonder how well they could get out of their nest if it was filled full of instant insulation :)
So this afternoon has turned into "fetch her some ice", so I decided to code up a small project I've been meaning to write for a few years:
mysql> INSTALL PLUGIN memcache SONAME 'libmemcache_engine.so';
Query OK, 0 rows affected, 0 warnings (0.06 sec)
mysql> create table foo3 (k varchar(128), val varchar(300)) ENGINE=memcache CONNECTION='localhost:6666';
Query OK, 0 rows affected (0.03 sec)
mysql> insert into foo3 VALUES ("frog", "Arf!");
Query OK, 1 row affected (0.00 sec)
And from the command line you can see:
[brian@zim memcache_client]$ ./client frog
The VAL is Arf!
That is all of an hours worth of work. Made two loaves of bread while I was at it :)
And for tonight? Hot tubbing out at a friend's house up in Snohomish County.
The code is available via my repositories, I'll wrap it up as a 0.1 release tomorrow if I get a chance. It needs to be fixed for key reads. I can currently have it operate in two modes:
1) Store rows.
2) Store just a single blob.
The nice thing about the "store a single blob" is that then you can pull the row from the client. Right now if I use the row format for "row" then only another MySQL server can read the rows. I could probably come up with some sort of "meta format" which was readable by any client, but I've not thought a lot on that at this point. Multiple MySQL servers can all read from the same cache.
It makes for a good afternoon's toy :)
Came home to discover that Christine had been stung by a Yellow Jacket. Despite the full can of Yellow Jacket killer I sprayed into the nest last night, they seem to be quite alive. I am tempted to run to the store and get some of the instant foam I use for sealing insulation leaks. I wonder how well they could get out of their nest if it was filled full of instant insulation :)
So this afternoon has turned into "fetch her some ice", so I decided to code up a small project I've been meaning to write for a few years:
mysql> INSTALL PLUGIN memcache SONAME 'libmemcache_engine.so';
Query OK, 0 rows affected, 0 warnings (0.06 sec)
mysql> create table foo3 (k varchar(128), val varchar(300)) ENGINE=memcache CONNECTION='localhost:6666';
Query OK, 0 rows affected (0.03 sec)
mysql> insert into foo3 VALUES ("frog", "Arf!");
Query OK, 1 row affected (0.00 sec)
And from the command line you can see:
[brian@zim memcache_client]$ ./client frog
The VAL is Arf!
That is all of an hours worth of work. Made two loaves of bread while I was at it :)
And for tonight? Hot tubbing out at a friend's house up in Snohomish County.
The code is available via my repositories, I'll wrap it up as a 0.1 release tomorrow if I get a chance. It needs to be fixed for key reads. I can currently have it operate in two modes:
1) Store rows.
2) Store just a single blob.
The nice thing about the "store a single blob" is that then you can pull the row from the client. Right now if I use the row format for "row" then only another MySQL server can read the rows. I could probably come up with some sort of "meta format" which was readable by any client, but I've not thought a lot on that at this point. Multiple MySQL servers can all read from the same cache.
It makes for a good afternoon's toy :)
(no subject)
from:
ein_traum
date: Aug. 26th, 2006 11:04 pm (UTC)
Link
not my idea of a way to spend a beautiful saturday, but I very much appreciated your & our other housemate's help :)
Reply | Thread
(no subject)
from:
tealynx
date: Aug. 27th, 2006 01:51 am (UTC)
Link
*hugs* to your lovely lady and let her know we hope she feels better soon.
Reply | Thread
(no subject)
from:
brianfey
date: Aug. 27th, 2006 07:31 am (UTC)
Link
I found the best thing is to poison them over and over again until I win. Doesn't sound very nice to do... but better than folkks getting stung. Bees make poor housemates.
Reply | Thread
(no subject)
from:
krow
date: Aug. 27th, 2006 08:47 am (UTC)
Link
Reply | Parent | Thread
(no subject)
from:
geothermal
date: Aug. 27th, 2006 08:03 am (UTC)
Link
And I think you can't just spray the nest, as half the hive is out somewhere else. Spray it at night or smash the nest and run and it takes a long time for them to rebuild it. Also make nests out of paper that look the nest you just destroyed. Wasps and jackets are territorial and will not build nests near other nests (even if they are unoccupied). This worked at my campout in canada recently. But I don't know if it was for wasps only or all nesting stingers.
Jonathan
Reply | Thread