mloughran / em-hiredis

Eventmachine redis client
MIT License
221 stars 63 forks source link

Added tests, plenty of awesome features #3

Closed qrush closed 13 years ago

qrush commented 13 years ago

This series of commits adds:

mloughran commented 13 years ago

This all looks marvelous so thanks - and it's great to have a test suite at last ;) There's a few tests more I'd like to add for the specific stuff that's different in em-hiredis - they'll be much easier to slot in now.

I'd like to keep an option of a fairly bare 'close to the metal' interface for em-hiredis (was one of the things that annoyed me about em-redis) - so things like the INFO parsing bother me a little. I think what I'll do is introduce a bare client which just does the bare minimun connection handling and then have a more fully featured client built on top that can do more elaborate reply processing etc.

BTW do you actually know that member? is faster than include? Since n = 2 I'm not quite convinced by the O(1) vs O(n) argument!

qrush commented 13 years ago

I think keeping the client bare metal is fine, but the exception is that you NEED to parse the INFO hash, no matter what. I mean, we parse the pluses out of "+OK" and that's fine.

Re: set vs array, according to this highly scientific benchmark it's faster. https://gist.github.com/935775 But yeah, whatever! :)

Can you ship another gem version? I think at least a 0.1.0 is in order. I would say fuck it, release a 1.0 (http://semver.org), SHIP IT!!!!

mloughran commented 13 years ago

Thanks for that benchmark. Looks like we're saving about 100 pico seconds per request :-D

r.e the parsing - I agree r.e. info but I'm more talking about parsing things such as hgetall into a hash which is useful sometimes but not always necessary.

Agree r.e. gem - will get to that soonish. Cheers!