开发者

Best Method for incorporating 3rd party api's into my php web app

Using php I'm trying to figure out the most efficient way to design my web app to incorpor开发者_Go百科ate 3rd party API's. The user of the app does not need to see the response from the api call.

So for instance a user will click to send maybe 1000 emails. Those emails will go via someone like SendGrid or Amazon SES. The user does not need to wait until those emails have been processed. Essentially I want those processed in the background with the user returned to the web app.

Should I be thinking of using a queuing service like SES

I have at least three api's I am incorporating.

Thanks


The most probable way is running some background processes and sending them messages via some queuing solutions like RabbitMq (see also the SlideShare presentation for details). You may also consider using Gearman for distributed computing: make GearmanClient::doBackground() calls from API wrappers, run Gearman job servers as middle points and run workers that actually will make calls to your APIs. See some presentations for further details.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜