Cassandra为什么用Java编写? [英] Why was Cassandra written in Java?

查看:681
本文介绍了Cassandra为什么用Java编写?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关于 Cassandra 的问题




为什么地狱上的人会用Java编写一个数据库ENGINE?

我可以理解为什么你会想要一个Java接口,但引擎...



我的印象是没有比C / C ++更快,数据库引擎不应该比最大速度慢,而且肯定不会使用垃圾回收...




任何人可以解释我有什么可能的感觉,为什么Cassandra可以比在C / C ++代码上运行的普通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.

推荐答案

我可以看到一些原因:


  • 安全:编写安全软件更容易在Java中比在C ++(记住缓冲区溢出?)

  • 性能:这不是更糟。在启动时肯定会更糟,但一旦代码运行起来,这不是一件大事。实际上,您必须记住一个重要的一点:Java代码由VM持续优化,因此在某些情况下,它将比C ++更快。

这篇关于Cassandra为什么用Java编写?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆