douxin2011 2010-04-11 23:52
浏览 47
已采纳

将Java应用程序移植到Go-有什么建议吗?

We want to rewrite kodingen.com backend with Go which currently is Java, running as daemon using jsvc.

I have never touched any C in my life, am only experienced in Java so I don't know if this is something that I should even start.

However, task is pretty simple

  • read shell commands from mysql database
  • queue and execute them in parallel
  • save each shell output to the database

that's it. So these simple requirements gives me hope that I can start using this wonderful language.

What would you advise? Is C still better ?

  • 写回答

4条回答 默认 最新

  • douti9286 2010-04-12 13:39
    关注

    I like Go a lot and have made contributions to the project. However, I think you ought to consider a few things about Go before settling on it for sure.

    • Go is still an unstable language. Its syntax, features, and packages are all subject to change. Make sure you're ready to keep up with this if you choose to use it.
    • Go's garbage collection is still immature. Your memory usage should be better than 1.2 GB, but it probably won't get you near C levels.
    • There's no core support for MySQL (or any other database). There are several unofficial MySQL package projects. The most recently updated ones are GoMySQL and Go-MySQL-Client-Library. I don't know anything about how complete or stable they are.

    As for queuing and executing in parallel, I think that's something Go will be able to do pretty well. You'll probably use the exec package to execute and parallelize with goroutines.

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

报告相同问题?

悬赏问题

  • ¥50 树莓派安卓APK系统签名
  • ¥15 maple软件,用solve求反函数出现rootof,怎么办?
  • ¥65 汇编语言除法溢出问题
  • ¥15 Visual Studio问题
  • ¥20 求一个html代码,有偿
  • ¥100 关于使用MATLAB中copularnd函数的问题
  • ¥20 在虚拟机的pycharm上
  • ¥15 jupyterthemes 设置完毕后没有效果
  • ¥15 matlab图像高斯低通滤波
  • ¥15 针对曲面部件的制孔路径规划,大家有什么思路吗