开发者

Task Queue Java API

What is the purpose of Task Queue Java API? How does it work, an开发者_运维知识库d where should it be used?


The homepage looks pretty unambiguous:

With the Task Queue API, applications can perform work outside of a user request but initiated by a user request. If an app needs to execute some background work, it may use the Task Queue API to organize that work into small, discrete units, called Tasks. The app then inserts these Tasks into one or more Queues. App Engine automatically detects new Tasks and executes them when system resources permit.


One thing GAE does is keep your request-response cycle very short lived to increase scalability. That is why lot of things like database access and http requests are handled asynchronously.

However there are requests that just can't be fully handled in realtime. This is either because such requests do some long computation (so they can be done in the background) or because they are periodic tasks like cron jobs that you need to schedule and execute repeatedly.

Tasks Queue let do you that.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜