为什么很多nosql存储都是用java编写的?
据我所知,很多nosql存储都是用java编写的,例如HBase,Cassandra。但根据我的经验,很多高性能的服务器程序都是用c/c++编写的(例如Apache、Opensips等),为什么这样的java实现的程序在生产使用中能够表现良好?是因为Java代码很容易阅读吗?用java实现的维护和分布式系统扩展性很好吗?
BTW,我知道用Java写代码肯定效率更高,但是正如有人说的,在大公司实现速度不是问题,因为一旦实现并重构几轮,程序就可以运行得很好,所以时间成本从长远来看并不高。
As far as I know, many nosql stores are written in java, for example HBase, Cassandra. But according to my experience, many high performance server program are written in c/c++ (e.g. Apache, Opensips, etc.), why can such java-implementing program behave well in production use?Is it because that Java code is easy to read and maintain and distributed system implemented in java scales well?
BTW, I know that writing code in Java is sure more productive, but as someone said, implementation speed is not a question in big company, because once implemented and refactor for several rounds, the program can run very well, so the cost of time is not high for from a long term view.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您点击右侧“相关”部分中的第一个链接(为什么 Cassandra 用 Java 编写),您将找到答案。
简短摘要:
< “根据定义,C/C++ 比 Java 更快”的神话只是一个神话。查看这个问题作为反例。
If you follow the first link (Why was Cassandra written in Java) in the "Related" section on the right, you will find answers.
Short summary:
EDIT The "C/C++ is faster than Java by definition" myth is just that - a myth. Look at this question for a counter example.