gjedeer / celery-php

PHP client for Celery
http://massivescale.net/celery-php/
Other
422 stars 120 forks source link

Transport abstraction layer #105

Closed makasim closed 7 years ago

makasim commented 7 years ago

Celery itself supports several types of transport where the client only one.

Would you be interested in adding an abstraction layer on top of https://github.com/php-enqueue/psr-queue . It is Java message service like queue abstraction layer. It already supports amqp, redis and amazon sqs (those are supported by celery) and others.

We could work on this if there is a green light from your side on such an addition.

We will need an ability not only schedule tasks from php but also to execute php tasks from celery. It is something will do after this one.

gjedeer commented 7 years ago

Celery-PHP supports Redis and 2 modes of AMQP (pure-PHP and with the C extension). I don't see any value added from using an abstraction layer where we already have one. Celery has per-transport protocol differences so we'd have to abstract the queues anyway (say, if we used psr-queue and wanted to add SQS, we'd still need to have an SQS-specific class in celery-php).

Executing PHP tasks would be an interesting addition. Do you think there is any code in celery-php that you could reuse? Isn't that something that should be a separate project? I'm not saying no, just discussing.

makasim commented 7 years ago

I haven't dived into it yet it just something we certainly need.

We'll have to create our own package (or fork this one).

Thanks.

gjedeer commented 7 years ago

If you ever get to implementing the worker side, please drop a line, I'll be happy to place a link to it (and make Celery a truly multi-platform protocol)