Go应用服务器?

huangapple go评论74阅读模式
英文:

Go application server?

问题

能否利用基于模块化组件的设计在Go平台上运行的应用服务器来实现这个设计?

是否有限制使得这个设计在Go上不可能实现?

英文:

Would it be possible to leverage a design based on modular components running on an application server with Go platform?

Is there a limitation that makes this design impossible with Go?

答案1

得分: 2

在Java或.NET中没有类似应用服务器的东西可用
但是有支持Go的Google AppEngine

在Go中没有像Java或.NET那样加载/卸载代码的方式

你不能将Go编译为库,然后在另一个Go应用程序中加载它。

无论如何,你可以使用Go创建应用服务器。
它将具有多个进程,并通过启动/停止进程来加载/卸载代码。

此外,它可以通过在模块中嵌入一些服务器特定的代码来在服务器上编译代码。
例如,这些额外的代码可以实现应用服务器之间的进程通信。

英文:

There is nothing similar to application server that are available in Java or .NET
But there is google AppEngine that supports Go

There is no way to load/unload code in Go like in Java or .NET

You can't compile go as library that you will load with another Go App.

Anyway you can create Application server with Go.
It will have multiple processes and load/unload code by starting/stopping processes.

Also it may compile code on server by embedding some server specific code in module.
e.g. such extra code may implement AppServer Inter Process Communication.

答案2

得分: 2

为了实现这个目的,XATMI服务概念非常适合,它将独立的可执行二进制文件作为无状态服务。应用服务器通过中间件管理它们的IPC通信,管理进程状态(保持所有进程运行),提供进程重新加载等工具。作为示例,我可以提到Enduro/X ASG项目(https://github.com/endurox-dev/endurox-go),它完成了所有这些任务。它还提供了分布式事务处理框架。

英文:

For this purpose perfectly suites XATMI service concept, which makes separate executable binaries as stateless services. And the application server governs their IPC communications via middleware, manages process statues (keep all processes up and running), provides tools for process reloading, etc. As example I can mention Enduro/X ASG project(https://github.com/endurox-dev/endurox-go), which does all of these tasks. Also it provides distributed transaction processing framework.

答案3

得分: 0

在我理解中,Go的一个主要特点是它既不需要应用服务器,也不允许在运行时添加/加载代码。Go是编译的,并且(几乎)是静态链接的,可执行文件已经准备好运行。

虽然在运行时添加模块似乎很方便,但它也有很大的缺点,特别是增加了部署和依赖的复杂性。

我怀疑Go社区会认为模块系统是一种“优势”。

英文:

In my understanding one of the main features of Go is that it neither needs an application server, nor that code can be added/loaded at runtime. Go is compiled and (almost) statically linked and the executable is ready to run.

While all this module at runtime seems convenient it has massive drawbacks, especially increasing deployment and dependency complexity.

I doubt that the Go community would regard a module system as "leverage".

huangapple
  • 本文由 发表于 2012年9月29日 01:20:44
  • 转载请务必保留本文链接:https://go.coder-hub.com/12644566.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定