duanjia2772 2012-11-19 15:37
浏览 30
已采纳

Go如何在G-WAN上运行?

I read that G-WAN supports Go. As far as I know, Go can only produce statically linked executables. So how does Go work on G-WAN, through CGI/FastCGI? Or simply invoking the executable with the raw request on stdin?

I would love to be able to program Go and take advantage of G-WAN's performance.

  • 写回答

2条回答 默认 最新

  • duanlan3598 2012-11-19 16:14
    关注

    GO has its own runtime, it uses segmented stacks and it introduced goroutines, so a C program cannot (easily) embed GO the way C++, C-Sharp, Java can be used from C. This would be possible to do but many pitfalls would have to be resolved.

    Therefore, for GO G-WAN has used CGI, which works very well if you have many CPU Cores (re-tested today with a newer release of GO on 6-CPU Cores).

    Other precautions have been taken to prevent a long GO servlet from preventing G-WAN from processing other requests while the GO reply is built but the rest is pretty straightforward.

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

报告相同问题?

悬赏问题

  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统