mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-16 15:21:13 +08:00

committed by
Alexander Makarov

parent
c8991e86c2
commit
657fb88592
@ -198,7 +198,7 @@ There are two methods to process data offline: pull and push.
|
|||||||
In the pull method, whenever a request involves some complex operation, you create a task and save it in a persistent
|
In the pull method, whenever a request involves some complex operation, you create a task and save it in a persistent
|
||||||
storage, such as database. You then use a separate process (such as a cron job) to pull the tasks and process them.
|
storage, such as database. You then use a separate process (such as a cron job) to pull the tasks and process them.
|
||||||
This method is easy to implement, but it has some drawbacks. For example, the task process needs to periodically pull
|
This method is easy to implement, but it has some drawbacks. For example, the task process needs to periodically pull
|
||||||
from the task storage. If the pull frequency is too low, the tasks may be processed with great delay; but if the frequency
|
from the task storage. If the pull frequency is too low, the tasks may be processed with great delay, but if the frequency
|
||||||
is too high, it will introduce high overhead.
|
is too high, it will introduce high overhead.
|
||||||
|
|
||||||
In the push method, you would use a message queue (e.g. RabbitMQ, ActiveMQ, Amazon SQS, etc.) to manage the tasks.
|
In the push method, you would use a message queue (e.g. RabbitMQ, ActiveMQ, Amazon SQS, etc.) to manage the tasks.
|
||||||
|
Reference in New Issue
Block a user