Skip to content
Newer
Older
100644 53 lines (39 sloc) 3.54 KB
b2f4bc0 @JEG2 Adding the mission statement.
authored Nov 27, 2009
1 = What is Oklahoma Mixer?
2
3 Oklahoma Mixer is a Ruby FFI interface to the C library for Tokyo Cabinet. It allows you to use the key-value store from Ruby.
4
f67e7bb @JEG2 Minor documentation cleanup.
authored Nov 27, 2009
5 == Why not just use rufus-tokyo?
b2f4bc0 @JEG2 Adding the mission statement.
authored Nov 27, 2009
6
7 There is already a Ruby FFI interface to Tokyo Cabinet and more called {rufus-tokyo}[http://github.com/jmettraux/rufus-tokyo]. I am a huge fan of rufus-tokyo and have contributed to that project. I have learned a ton from working with rufus-tokyo and that code was my inspiration for this library.
8
9 That said, I did want to change some things that would require big changes in rufus-tokyo. Here are the things I plan to do differently with Oklahoma Mixer:
10
11 * Tokyo Cabinet's B+Tree Database has some neat features, like custom ordering
12 functions, that are hard to expose through rufus-tokyo due to the way it is
13 designed. I would have had to rewrite pretty much that entire section of the
14 library anyway to add these features.
15 * There are some places where rufus-tokyo uses more memory than it absolutely
16 must or slows itself down a bit with extra iterations of the data. Again,
17 this is a result of how it is designed. It allows more code reuse at the cost
18 of some efficiency. I wanted to improve performance in those areas.
19 * I'm working on some higher level abstractions for Tokyo Cabinet that I
20 eventually plan to include in this library. These extra tools are the reason
21 I needed to make these changes and additions.
22 * Finally, rufus-tokyo paved the way to a Ruby-like interface for Tokyo Cabinet.
23 Previous choices were scary in comparison. I wanted to push that movement
24 even further though and get an even more Hash- and File-like interface, where
25 possible.
26
27 It's important to note though that rufus-tokyo does do some things better and it always will. Its advantages are:
28
29 * It offers a nice Ruby interface over a raw C extension which is faster than
30 using FFI. I have no intention of duplicating that interface, so rufus-tokyo
31 will remain the right choice for raw speed when using MRI.
32 * For now, rufus-tokyo is more full featured. It provides interfaces for Tokyo
33 Tyrant and Tokyo Dystopia. I would like to add these eventually, but I'm
34 starting with just Tokyo Cabinet.
35 * It offers a pure Ruby interface for communicating with Tokyo Tyrant without
36 needing the C libraries installed. I won't be copying that either, so it will
37 remain the right choice for a no dependency install.
38 * For now, it's more mature. A lot of developers have used it and contributed
39 to it. It's probably the safer library to trust for production applications
40 at this time.
41
f67e7bb @JEG2 Minor documentation cleanup.
authored Nov 27, 2009
42 == Why did you call it Oklahoma Mixer?
b2f4bc0 @JEG2 Adding the mission statement.
authored Nov 27, 2009
43
44 When I was in Japan, people would ask where I was from. When I would tell them, "Oklahoma, U.S.A.," they often replied with, "Ah, I know the Oklahoma Mixer." Some would even dance a little when they said it.
45
46 It turns out Oklahoma Mixer is a song in Japan. I had to track it down in a music store. It's kind of a camp song medley, including things like the Hokey Pokey. I'm not too sure what that has to do with Oklahoma, but at least they had heard of where I'm from.
47
48 On a more practical side, this interface to Tokyo Cabinet is from Oklahoma. I intend it to _mix_ together all of the great features of that library in some exciting new ways. Thus, Oklahoma Mixer it is.
4b2c6f7 @JEG2 Adding a link to the documentation.
authored Jan 10, 2010
49
50 == Is there any documentation yet?
51
4064e1a @JEG2 Fixing my link syntax.
authored Jan 10, 2010
52 I'll write some proper API documentation down the road a bit, but users playing with the preview releases can read about how to use this library in {the Tokyo Cabinet series on my blog}[http://blog.grayproductions.net/articles/using_keyvalue_stores_from_ruby].
Something went wrong with that request. Please try again.