Webador / SlmQueue

Laminas / Mezzio module that integrates with various queue management systems.
Other
137 stars 56 forks source link

Redis support #153

Closed stefankleff closed 2 years ago

stefankleff commented 9 years ago

Is anybody already working on that?

We're currently switching our cache backend to redis and I like to use that as queueing backend too. But I also like to stick with SlmQueue. If no work is done yet, I can start to write that. But I'm not yet very familiar with Redis. So I need to glimpse at the php-resque(-ex) and Laravel implementations and may need some help as well as a review.

bakura10 commented 9 years ago

Hi,

No work has been done, but maybe @juriansluiman can open a SlmQueueRedis ? :)

juriansluiman commented 9 years ago

No, no work has been done yet but a while ago I gave it some thought. @stefankleff if you want we can collaborate on a Redis backend for SlmQueue.

A few things worthy I have thought about:

  1. Check the slides from Ross Tuck about Redis and esp. from slide 154 and on about queues.
  2. Redis has a PHP extension, phpredis (fast!) and a php library, predis (slower, installable via composer). We should support both via an adapter & interface, so you can swap those around
  3. Like we do with SQL, you need a "pending" queue and a "running" queue, with BRPOPLPUSH you can atomically switch jobs from queue "pending" to queue "running". It's blocking, so it waits for a new job to come by automatically
stefankleff commented 9 years ago

Sounds good! I hope that I can start working on that within next week

juriansluiman commented 9 years ago

See juriansluiman/SlmQueueRedis#1 for the issue I opened to get started. I have made a small outline, but if you have alternative ideas you can completely ignore those.

roelvanduijnhoven commented 6 years ago

@stefankleff I don't think the Redis adapter is going anywhere, right ;)? I'll keep this open; as it definitely would be useful for some.

stefankleff commented 6 years ago

Not really. I'm working now in another company and where it is not used.