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条)

报告相同问题?

悬赏问题

  • ¥15 asp.textbox后台赋值前端不能显示什么原因
  • ¥15 宇视监控服务器无法登录
  • ¥15 PADS Logic 原理图
  • ¥15 PADS Logic 图标
  • ¥15 电脑和power bi环境都是英文如何将日期层次结构转换成英文
  • ¥15 DruidDataSource一直closing
  • ¥20 气象站点数据求取中~
  • ¥15 如何获取APP内弹出的网址链接
  • ¥15 wifi 图标不见了 不知道怎么办 上不了网 变成小地球了
  • ¥50 STM32单片机传感器读取错误