reinh / statsd

A Ruby Statsd client that isn't a direct port of the Python example code. Because Ruby isn't Python.
MIT License
411 stars 154 forks source link

Singlethread #54

Closed raggi closed 10 years ago

raggi commented 10 years ago

Straw man implementation for single I/O thread.

This should help those with Fiber pools.

Needs finishing by someone, there are likely bugs in other block-accepting methods than batch (block timing for example).

cc @cheald @quirkey @tarcieri @JustinAiken @reinh @ossareh

30 #45 #49 #50 :dash:

tarcieri commented 10 years ago

This looks reasonable to me (at least pending successful CI build :wink:)

cheald commented 10 years ago

Looks good. I think I might add some kind of exception if the queue grows too large, though - if you have high emit rates, and have improperly configured DNS caching, then your queue could grow unbounded and cause some nasty problems in the calling application. IMO, noisy failure is better in that case.

I'm also not crazy about the "Singlethread" name - it makes it sound like it's for use in non-threadsafe contexts, when it's the exact opposite. I don't have a great replacement suggestion off the top of my head, though.

JustinAiken commented 10 years ago

This would work well with calls to the statsd object from multiple celluloid actors on jRuby?