Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

EventMachine HandlerSocket MySQL plugin for direct read/write of InnoDB tables

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .rspec
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 em-handlersocket.gemspec
README.md

EM-HandlerSocket

EventMachine client for HandlerSocket MySQL plugin for direct read/write of InnoDB tables. This plugin bypasses any/all SQL parsing, query planner, and other MySQL locks, while giving you the advantage of InnoDB persistence, speed, and the network daemon! Best of all, HandlerSocket plugin runs alongside your regular MySQL engine, which means you still have the full advantage of a SQL console at your disposal.

HandlerSocket: The NoSQL MySQL & Ruby

Features

  • Plays nicely with the (EventMachine) reactor
  • Find, Multi-find, Insert, Update, Delete support
  • No native extensions
  • Pipelined processing

Example: Open & Read from an InnoDB index

Open the PRIMARY key index on the widgets.user InnoDB table, and query for id == 1.

EM.run {
  c = EM::HandlerSocket.new
  idx = {:id => 0, :db => 'widgets', :table => 'user', :index_name => 'PRIMARY', :columns => 'user_name'}

  d = c.open_index(idx)
  d.callback do

    d = c.query(:id => 0, :op => '=', :key => '1')
    d.errback { p 'uh oh!' }
    d.callback do |data|
      p ["received data", data]
    end
  end
}

Resources

License

(The MIT License) Copyright © 2011 Ilya Grigorik

Something went wrong with that request. Please try again.