README.markdown in oria-0.0.2 vs README.markdown in oria-0.0.3

- old
+ new

@@ -1,16 +1,16 @@ Oria === Oria (oh-rye-uh) is an in-memory, Ruby-based Key-Value Store. It's designed to handle moderate amounts of data quickly and easily without causing deployment issues or server headaches. It uses EventMachine to provide a networked interface -to a semi-persistent KVS and asynchronously writes the in-memory data to YAML files. +to a semi-persistent store and asynchronously writes the in-memory data to YAML files. Installation - -Oria is a provided as a Gem. Use the following command to install it: +Oria is provided as a Gem. Use the following command to install it: gem install oria --source http://gemcutter.org That's it! You're ready to start storing basic data in memory. Now add @@ -39,11 +39,11 @@ untested, so please test it heavily before deploying, and _report any issues you may have!_ Usage - -Okay, now for the fun part. Oria behaves (mostly) like a Hash - you could say that it responds to 2/3 of @wycats' Moneta +Okay, now for the fun part. Oria behaves (mostly) like a Hash - you could say that it responds to 2/3 of [@wycats](http://github.com/wycats)' Moneta plugin. Specifically, it responds to the following Hash methods: []=(value) Set a key to ... something. [] Retrieve a key @@ -115,19 +115,75 @@ Oria.app_key = "my_app_2" Oria[:foo] #=> nil Oria.app_key = "my_app_1" Oria[:foo] #=> "bar" +That's it! I hope you enjoy Oria, and please let me know if you find any issues or have any trouble. As you will no doubt see from +the current version information, it's a very young project, and any contribution is welcome. + Dependencies - Oria speaks JSON, so it relies on the JSON gem. It depends on the newest stable version (1.2.0), so be sure to add the right version checking code to your legacy apps before using Oria! It also needs [EventMachine](http://github.com/eventmachine/eventmachine) to do everything. Yes, I could have used Drb or straight UDP sockets, and spent a lifetime on this. But EventMachine is seriously, seriously, seriously awesome, and works very well without me writing an insane amount of code I couldn't write very well anyway. Check it out and see for yourself. -That's it! I hope you enjoy Oria, and please let me know if you find any issues or have any trouble. As you will no doubt see from -the current version information, it's a very young project, and any contribution is welcome. +Warnings +- + +Oria is weak in a few places. First, it forks all over the place with no regard for the consequences. Someday I'm going to upgrade it +to use Daemons, but not right now. In general, the forking is dangerous and clumsy. + +Also, Oria's auto-start feature relies on `sleep`. In fact, Oria relies on `sleep` in more than one place. _This is terrible_ and I +want to fix it someday. But I also want to get the code out there so people can start breaking it and tell me where it breaks. + +Which means: **please report any problems you have using the [Github issue tracking](http://github.com/flipsasser/oria/issues)!** + +Benchmarks +- + +I've run some benchmarks comparing Oria to Redis. It's not pretty: + + user system total real + Redis (write): 0.050000 0.020000 0.070000 ( 0.115850) + Oria (write): 0.140000 0.110000 0.250000 ( 1.267912) + Redis (read): 0.070000 0.020000 0.090000 ( 0.145078) + Oria (read): 0.150000 0.110000 0.260000 ( 1.247791) + +As you can see, Oria is about 10x slower than Redis on my development computer. Even worse, if you run the benchmark like so: + + ruby redis_v_oria.rb 10000 + +Oria's server will fail to fulfill all of those requests. Scary. Clearly, it needs some serious improvement. Oria will never be +as performant as something like Redis - it's not meant to be (plus it's written in Ruby, not C). But it could use some reduction +in overhead, and any help is welcome. + +But I knew Oria wouldn't compete with Redis. What about MySQL? + + user system total real + MySQL (write): 0.270000 0.030000 0.300000 ( 0.445586) + Oria (write): 0.170000 0.120000 0.290000 ( 1.676674) + MySQL (read): 0.310000 0.020000 0.330000 ( 0.484944) + Oria (read): 0.120000 0.120000 0.240000 ( 1.616851) + +Ew. Oria is consistently about 4x slower than MySQL. But check this out: I removed persistence, and here are the new benchmarks: + + user system total real + Redis (write): 0.040000 0.020000 0.060000 ( 0.113882) + Oria (write): 0.130000 0.100000 0.230000 ( 0.396776) + Redis (read): 0.070000 0.020000 0.090000 ( 0.145068) + Oria (read): 0.130000 0.100000 0.230000 ( 0.395410) + +That's getting competitive. How about MySQL? + + user system total real + MySQL (write): 0.270000 0.030000 0.300000 ( 0.453413) + Oria (write): 0.150000 0.110000 0.260000 ( 0.430725) + MySQL (read): 0.320000 0.030000 0.350000 ( 0.484978) + Oria (read): 0.100000 0.100000 0.200000 ( 0.373431) + +Oh snap! Oria outperforms MySQL when persistence is disabled. So I'll have to refactor the code. Copyright (c) 2009 Flip Sasser, released under the MIT license \ No newline at end of file