doufan8805 2011-02-22 15:47 采纳率: 0%
浏览 62
已采纳

将第三方API加入我的php网络应用程序的最佳方法

Using php I'm trying to figure out the most efficient way to design my web app to incorporate 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

  • 写回答

1条回答 默认 最新

  • douren2395 2011-02-22 15:57
    关注

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 神经网络Sequential name=sequential, built=False
  • ¥16 Qphython 用xlrd读取excel报错
  • ¥15 单片机学习顺序问题!!
  • ¥15 ikuai客户端多拨vpn,重启总是有个别重拨不上
  • ¥20 关于#anlogic#sdram#的问题,如何解决?(关键词-performance)
  • ¥15 相敏解调 matlab
  • ¥15 求lingo代码和思路
  • ¥15 公交车和无人机协同运输
  • ¥15 stm32代码移植没反应
  • ¥15 matlab基于pde算法图像修复,为什么只能对示例图像有效