doulei1965 2011-07-07 01:29
浏览 114
已采纳

选择API服务器的框架

I'm looking to build an API server with the following traits:

  • Serves JSON/XML HTTP requests only (no web-pages).
  • Is mostly DB intensive, not so much CPU intensive.
  • Should be highly scalable.
  • Has versatile front-ends: web-browsers, native mobile (Android and iOS for now)

I am experienced with Apache Tomcat, httpd, MySQL and PHP, so these are obviously my default choices. However, before automatically going there:

Would you recommend any other constellation of technologies (Node.js, Rails...) for this type of server?

I'm mostly interested in performance/scalability related advantages/disadvantages.

  • 写回答

3条回答 默认 最新

  • dongzhuang5741 2011-07-07 19:08
    关注

    I would personally use node.js.

    Serves JSON/XML HTTP requests only (no web-pages).

    Nowadays most API's just only support JSON and I would advice you to do the same. In node.js creating JSON is just as simple as calling JSON.stringify on an object.

    Is mostly DB intensive, not so much CPU intensive.

    node.js does non-blocking IO and has very good performance with some databases like for example redis, mongodb.

    Should be highly scalable.

    node.js is very fast and you can use NGinx to scale if single box does not cut it, but probably one single box will be enough.

    Has versatile front-ends: web-browsers, native mobile (Android and iOS for now)

    I think your API should probably provide oauth like most others API's do. This is the only problem with node.js I think because only one library is available and I don't know the quality of this package

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 想通过pywinauto自动电机应用程序按钮,但是找不到应用程序按钮信息
  • ¥15 MATLAB中streamslice问题
  • ¥15 如何在炒股软件中,爬到我想看的日k线
  • ¥15 51单片机中C语言怎么做到下面类似的功能的函数(相关搜索:c语言)
  • ¥15 seatunnel 怎么配置Elasticsearch
  • ¥15 PSCAD安装问题 ERROR: Visual Studio 2013, 2015, 2017 or 2019 is not found in the system.
  • ¥15 (标签-MATLAB|关键词-多址)
  • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
  • ¥500 52810做蓝牙接受端
  • ¥15 基于PLC的三轴机械手程序