Re:Show HN: Redis-pipe – Use Redis lists like Unix pipes
by fprotthetarball on Wednesday April 08, 2015 @10:45AM
(#9341085)
The interesting thing about rp is that you can use it as a pipeline in your other Go applications, as the Redis pub/sub "pipe" is exposed as a normal Go io.Reader/io.Writer interface. Might be something worth expanding on somehow.
Re:Show HN: Redis-pipe – Use Redis lists like Unix pipes
by nissimk on Wednesday April 08, 2015 @09:54AM
(#9340755)
Why are you using LPUSH/LPOP instead of PUBLISH/PSUBSCRIBE?
I guess you get storage that way, but only one consumer of each message. It would be nice if it was optional in case you had a different application where you need to have multiple subscribers to the same topic.
https://github.com/whee/rp
I guess you get storage that way, but only one consumer of each message. It would be nice if it was optional in case you had a different application where you need to have multiple subscribers to the same topic.
cat jobs.txt | redis-pipe jobs
An then on several workers: redis-pipe --count 10 jobs | python do-work.py | redis-pipe results
An then in the end: redis-pipe results > results.txt
Or you can use it as simple logging mechanism: tail -f /var/log/syslog | ./redis-pipe logs