Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/igrigorik/em-handlersocket
EventMachine HandlerSocket MySQL plugin for direct read/write of InnoDB tables
https://github.com/igrigorik/em-handlersocket
Last synced: 2 months ago
JSON representation
EventMachine HandlerSocket MySQL plugin for direct read/write of InnoDB tables
- Host: GitHub
- URL: https://github.com/igrigorik/em-handlersocket
- Owner: igrigorik
- Created: 2011-01-10T03:20:44.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2011-01-15T03:57:23.000Z (about 14 years ago)
- Last Synced: 2024-11-08T11:52:22.269Z (3 months ago)
- Language: Ruby
- Homepage: http://www.igvita.com/2011/01/14/handlersocket-the-nosql-mysql-ruby/
- Size: 109 KB
- Stars: 29
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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](http://www.igvita.com/2011/01/14/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 dod = c.query(:id => 0, :op => '=', :key => '1')
d.errback { p 'uh oh!' }
d.callback do |data|
p ["received data", data]
end
end
}## Resources
- [HandlerSocket Protocol](https://github.com/ahiguti/HandlerSocket-Plugin-for-MySQL/blob/master/docs-en/protocol.en.txt)
- [HandlerSocket @ DeNA](http://yoshinorimatsunobu.blogspot.com/2010/10/using-mysql-as-nosql-story-for.html)# License
(The MIT License)
Copyright © 2011 Ilya Grigorik