From: "Ara.T.Howard" Date: 2005-06-18T00:50:33+09:00 Subject: Re: Nitro + Og 0.19.0: Og reloaded part2! On Sat, 18 Jun 2005, George Moschovitis wrote: >>> experimental In-Memory/Filesystem adapter. >> have you played with using sqlite's in memory tables to leverage it's features >> for this? > > Hello, > > this is a pure ruby Og store implementation. A KirbyBase store will be > available soon as well (when I find time to finish it, or if someone > sends me a patch ;-)) > > I don't know anything about SQLite3's memory tables is this a different > table type like the Hash tables or InnoDB tables in Mysql? (btw 0.19.0 > adds support for mysql table types). you just specify the table as being in memory and use them normally - only they never hit disk. another, *nix specific, approach i use a lot is (essentially) begin FileUtils::cp 'db', '/dev/shm/db' db = SQLite::Database::new '/dev/shm/db' yield db ensure FileUtils::mv '/dev/shm/db', 'db' end which really helps out in some situations since the 'file' is really just in memory so all intermediate writes and reads do not hit disk and only the initial/final state requires disk activity. this means a power failure loses everything after the first copy but this is often acceptable. i also would add that, in practice, you should lock the db using posixlock while moving in case an errant process is modifying the db during the copy... cheers. -a -- =============================================================================== | email :: ara [dot] t [dot] howard [at] noaa [dot] gov | phone :: 303.497.6469 | My religion is very simple. My religion is kindness. | --Tenzin Gyatso ===============================================================================