Closed grantr closed 10 years ago
@grantr - if you're going to use the HTTP API for publishing, I suggest avoiding client libraries entirely.
It's probably just a few lines of code to provide a basic abstraction around some pre-existing, solid, HTTP library for Ruby, right?
In my deployments, producers that use HTTP just use the language or framework provided functionality of whatever process they're in - that was a primary motivation for providing an HTTP publishing API.
Good point @mreiferson - I'll give that a shot.
Turned out to be really easy to do what @mreiferson suggested: https://github.com/grantr/qu/blob/nsq-http/lib/qu/backend/nsq_http.rb
:sunglasses:
Celluloid is started when requiring just the http producer, which (apparently) doesn't use celluloid:
Is celluloid necessary for the http producer to run? if not, would it be possible to require only the http producer without starting celluloid?
This would be useful for developers who are nervous about including celluloid and its (admittedly awesome) thread/fiber magic into their large, old ruby apps. They could run just the http producer in request paths and use celluloid only in worker processes.