为什么卡桑德拉用Java写的? [英] Why was Cassandra written in Java?
问题描述
了解卡桑德拉问题
为什么地球上的地狱会有人用Java编写数据库引擎?
我能理解你为什么会希望有一个Java接口,但发动机...
我是IM pression,有什么比C / C ++更快之下,一个数据库引擎应该不会有什么比最大速度慢,而且肯定不会使用的垃圾收集...
任何人都可以解释我是什么感觉可能使/为什么卡桑德拉可以比对C / C ++ code运行普通的SQL更快?
编辑:的结果
对不起,部分地球上为什么地狱,但它真的没有任何意义了我。
我忘了考虑一个数据库,不像普通的花园varitety用户程序,需要进行一次启动,然后运行了很长一段时间,也可能作为服务器上的唯一方案,这不言而喻使一个重要的性能差异。
我更比较/参考,以我是用在写的时候了失去作用(说得客气一点)的Java税方案(或者说本来希望使用)。
事实上,与使用Java进行纳税程序,用Java编写一个专用的服务器程序是非常合情合理的。
Question about Cassandra
Why the hell on earth would anybody write a database ENGINE in Java ?
I can understand why you would want to have a Java interface, but the engine...
I was under the impression that there's nothing faster than C/C++, and that a database engine shouldn't be any slower than max speed, and certainly not use garbage collection...
Can anybody explain me what possible sense that makes / why Cassandra can be faster than ordinary SQL that runs on C/C++ code ?
Sorry for the "Why the hell on earth" part, but it really didn't make any sense to me.
I neglected to consider that a database, unlike the average garden-varitety user programs, needs to be started only once and then runs for a very long time, and probably also as the only program on the server, which self-evidently makes for an important performance difference.
I was more comparing/referencing to a 'disfunctional' (to put it mildly) Java tax program I was using at the time of writing (or rather would have liked to use).
In fact, unlike using Java for tax programs, using Java for writing a dedicated server program makes perfect sense.
推荐答案
我可以看到有几个原因:
I can see a few reasons:
- 安全性:它更容易用Java编写比C ++安全的软件 (记得缓冲区溢出?)
- 性能:它不是那么糟糕。这是definetely糟糕启动,但一旦code是启动和运行,它不是一个大的事情。其实,你必须要记住的重要一点:Java的code不断由VM进行了优化,所以在某些circunstances它得到更快然后C ++
- Security: it's easier to write secure software in Java than in C++ (remember the buffer overflows?)
- Performance: it's not THAT worse. It's definetely worse at startup, but once the code is up and running, it's not a big thing. Actually, you have to remember an important point here: Java code is continually optimized by the VM, so in some circunstances it get faster then C++
这篇关于为什么卡桑德拉用Java写的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!