jbgo / chasqui Goto Github PK
View Code? Open in Web Editor NEWChasqui adds persistent publish-subscribe (pub-sub) messaging capabilities to Sidekiq and Resque workers.
License: MIT License
Chasqui adds persistent publish-subscribe (pub-sub) messaging capabilities to Sidekiq and Resque workers.
License: MIT License
Include rubycop and rcov tasks in the build
TODO: need to enable test coverage for forked processes in integration test
In order for sidekiq to recognize that a queue exists, it must be part of the queues set.
[12] pry(main)> Sidekiq.redis { |r| r.smembers 'queues' }
=> ["default"]
We need to ensure this set exists when creating subscribers, or events will never get processed.
Add metrics and monitoring for the chasqui broker.
TODO - more specific requirements
Sidekiq is multi-threaded, so be sure to include a thread safety check.
(This may be more of a 'pro tip' than something that needs to be baked into Chasqui, FYI)
At RFX, we've moved to versioning our event names. So, for example, you want to run some handler code whenever an asset data object is created. We would route/subscribe/publish an event as 'assets:created_v1' - where 'assets' is the channel and 'created_v1' is the event name. All this does is further decouple code. If we want to change the payload or handler code for that event, we just start publishing a '_v2' version of the event as needed. Sometimes the publisher may publish both the v1 and v2 events at the same time. The goal is allowing a way to safely upgrade all (or just some) of the event subscribers to the new version without breaking the old subscribers (even temporarily).
Anyway, this could be baked formally into Chasqui's event API or it could just be a 'protip' on naming events. Just wanted to throw it out there and see what you think. Let me know if you have any questions. Thanks!
for example:
I don't see those settings referenced anywhere else in the API. Is that just so Chasqui knows where to get the event details in redis? Or is it so that when chasqui gets one of those events he knows what queue (worker?) to dispatch the event to?
Anyway, not sure anything needs to be done about this - just curious. Thanks!
I want to see when a client subscribes/unsubscribes in the chasqui broker logs.
Currently, we're queueing jobs using the chasqui redis namespace. I don't think this should be the default so that the default configuration will work with resque/sidekiq without any changes. It definitely should be configurable.
For example, all of the following should work for handling event.
Chasqui.subscribe 'channel.name', 'queue-name', MySubscriber
Chasqui.subscribe('channel.name', 'queue-name') { |a, b| logger.info("sum: #{a + b}") }
Chasqui.subscribe 'channel.name', 'queue-name', ->(payload) { logger.info payload }
Port the chasqui client and broker to the Go programming language.
http://golang.org/
Implement a version of the broker that runs as a Lua script on the redis server.
http://redis.io/commands/eval
I would like for Chasqui to generate a unique event_id for every published event.
Ideally, this should be part of the build process.
After looking through the code I'm not sure how unsubscribing queues from a channel will work. I'm guessing at the moment if you removed a given subscription from the code the Chasqui worker would continue pushing work into that Redis list until you manually removed it from the set of subscribers.
Add support for popular error notification services like Honeybadger, NewRelic, Airbrake, Errbit, etc.
The resque/sidekiq workers can be configured just like any other resque/sidekiq worker.
Update contribution guidelines to include the following:
See inline comment on this commit: c6f39c3#diff-5fbc42bf6d8d1a87dd728eabebdc7a53R25
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.