Open ufobat opened 8 years ago
Good work! Yeah, I would totally include an async IO class. I like your idea: create a superclass that defaults to Async, but let's you override it with the Sync IO operations. (which I started to do once upon a time and never got very far).
Once you have something that looks good, just send a PR.
I've got something. But I need to say am not happy with the result. I dont like the $args passing around the differnet methods and the magic thats behind the undocumented parameters for $args. I also just fixed one (probably the most important) testcase: connect.t and wrote a connect_async.t
The Async IO part itself seems to work fine. :-) but there should be done some (re)design / cleanup and some testcase fixing.
I will probably not spend much more time on further changes, it seems that we wont use rethinkdb in our project.
Hi there,
yesterday I've implemented a Async IO interface to the rethinkdb server. I know i am breaking your test cases now, because async IO requires that one uses callbacks to get the data. I also dont know how you want to include this into your driver, if you maybe Want to have a Rethinkdb::AsyncIO and a superclass for both (sync and async) IO layers.
There is my code https://github.com/ufobat/perl-rethinkdb
Thats the beformance difference: (the numbers between >> X << is the number of reql updates per sec)
Sync (your original driver):
Async (my branch):