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

Web Service, MySQL, myhttp_engine, you expected this right?

About three years ago I implemented the myhttp engine. It is one of about three engines I wrote for 4.1 that I never made public.

If you have seen the example I gave at Google a couple of years ago, ha_giggle, this is the engine that it was based on (and it was the base for Mark's AWS Engine as well). Its a very basic engine that implements SELECT, INSERT, and DELETE... or as we call them in the web sphere, PUT, GET, and DELETE.

Just as an example you can do the following:

mysql> CREATE TABLE `d` (`a` varchar(125), b text, primary key(a)) ENGINE=HTTP DEFAULT CHARSET=latin1 CONNECTION="";

What can you do from this? You can SELECT pages from wikipedia :)

For INSERT to work you need a webserver that support PUT (and of course DELETE for DELETE). There is an Apache module for 1.3 but none exists for the 2.X servers. I've got a hacked up Apache module for this that I wrote years ago, but I would need to clean it up a lot before I would make it public.

You can find the announcement for it here:

And you can download it from:

If you find this sort of thing interesting I am teaching a three hour tutorial at the MySQL User's Conference in a couple of weeks, and I am doing a shorter 45 minute session on the very basics covering our pluggable API . More information here:

Writing Your Own Storage Engine
Understanding MySQL's Pluggable Engine AP
  • 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