英文:
How does Go run on G-WAN?
问题
我读到G-WAN支持Go。据我所知,Go只能生成静态链接的可执行文件。那么Go在G-WAN上是如何工作的,是通过CGI/FastCGI吗?还是简单地通过标准输入调用可执行文件?
我很想能够编写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.
答案1
得分: 3
GO有自己的运行时,它使用分段堆栈,并引入了goroutines,所以C程序不能(容易地)嵌入GO,就像C++、C-Sharp、Java可以从C中使用一样。虽然这是可能的,但是需要解决许多问题。
因此,对于GO,G-WAN使用了CGI,如果你有很多CPU核心,它可以很好地工作(在6个CPU核心上使用新版本的GO进行了重新测试)。
为了防止长时间的GO servlet在构建GO回复时阻止G-WAN处理其他请求,采取了其他预防措施,但其余部分非常简单。
英文:
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.
答案2
得分: 1
GO将在3.10版本上得到支持。请查看此链接。
但是3.10版本尚未发布。请查看Google Go部分以获取所需的库,也许您会对其支持方式有更好的了解。
英文:
GO will be supported on Version 3.10 Check this link.
But 3.10 is not released yet. Check the Google Go section for the required libraries maybe you will have better idea on how it is supported.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论