V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
halfcrazy
V2EX  ›  Node.js

NODE web 应用中,对于耗时的运算一般怎么处理?

  •  
  •   halfcrazy · 2015-05-23 00:13:38 +08:00 · 3968 次点击
    这是一个创建于 3262 天前的主题,其中的信息可能已经有所发展或是发生改变。
    需要在响应中及时返回运算结果的。
    7 条回复    2015-05-24 20:18:49 +08:00
    phoenixlzx
        1
    phoenixlzx  
       2015-05-23 00:23:25 +08:00   ❤️ 1
    C++
    wdhwg001
        2
    wdhwg001  
       2015-05-23 19:41:55 +08:00 via iPhone   ❤️ 1
    cluster可以保证主线程不被阻塞。
    halfcrazy
        3
    halfcrazy  
    OP
       2015-05-23 21:51:28 +08:00
    @wdhwg001 这个跟用pm2比有什么异同么
    yydcool
        4
    yydcool  
       2015-05-24 04:17:59 +08:00
    用C写一个外部程序调用
    zhonghua
        5
    zhonghua  
       2015-05-24 10:38:52 +08:00
    用c++写一个服务,专门进行耗时运算,使用node rpc调用,返回结果
    yyw
        6
    yyw  
       2015-05-24 16:14:55 +08:00
    @zhonghua 恩。
    anubiskong
        7
    anubiskong  
       2015-05-24 20:18:49 +08:00
    c
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1016 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 22:55 · PVG 06:55 · LAX 15:55 · JFK 18:55
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.