I just did a simple benchmark of inserting a million rows into a Tokyo Cabinet .fdb file versus a MySQL table. The Tokyo Cabinet insertions were 14 times faster.
Time.now.to_f: ------------------------- Start Tokyo: 1224676065.98518 End Tokyo: 1224676080.02634 Server version: 5.0.37 Start MySQL: 1224676080.07674 End MySQL 1224676246.60687 On Oct 21, 9:29 pm, David Beckwith <[EMAIL PROTECTED]> wrote: > Hello, > > I would like to create an ORM adapter for Tokyo Cabinet using > DataMapper (possibly). The reason I want to do this is because Tokyo > Cabinet is super fast (it can do like a million database writes in > half a second). > > Here is some info about DBM-like databaseshttp://en.wikipedia.org/wiki/Dbm > > Here is the tokyo cabinet page:http://tokyocabinet.sourceforge.net/index.html > > DBM database are interesting because they are basically hash tables: > a list of key-value pairs. I think that's why they are super fast. > Everything is O(1). > > Basically, I am thinking that each (table, column) pair could map to > a separate file. For example, let's say we had users and projects. 1 > user can have many projects. Users can have a first name and last > name, and projects can only have a name. > > User( id, first_name, last_name ) > Project( id, name, user_id ) > > I am thinking that we can auto-generate the following Tokyo Cabinet > files (below is some sample data): > > user-first_name.fdb > 00000001 David > 00000002 Ralph > > user-last_name.fdb > 00000001 Beckwith > 00000002 Nader > > project-name.fdb > 00000001 Making an ORM > 00000002 Lifting weights > 00000003 Learning Merb > 00000004 Saving the world > > project-user_id.fdb > 000000001 00000001 > 000000002 00000001 > 000000003 00000001 > 000000004 00000002 > > Anyway, I'm looking for somebody who would like to work on this with > me. My main concern is that I want to do graph traversal operations > fast, and I think it could be achieved this way. I have a program > that needs to do about a thousand read and writes per basic operation, > and sqlite3 is not cutting it. I don't know how much faster MySQL > would be -- even if it was 10 times faster, that wouldn't be fast > enough. I need something like 100 times or 1000 times faster. I > don't know of any OODBs available with a good Ruby interface and a > good open free license. If you know the answers to any of these > questions, please let me know. > > Again, let me know if you want to work on this with me. I envision > this to be a DataMapper database adapter. We can do it as an open > source project and become famous afterwards. lol. Email me at > > d b i t s o l u t i o n s @ g m a i l . c o m > > David :) > > P.S. I've never used Merb, or DataMapper. I'm coming from Rails and > Ruby. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "DataMapper" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/datamapper?hl=en -~----------~----~----~----~------~----~------~--~---
