Why was Cassandra written in Java?

Stefan Steiger picture Stefan Steiger · Feb 26, 2010 · Viewed 23.3k times · Source

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 ?

Edit:
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.

Answer

Martin picture Martin · Feb 26, 2010

What do you mean, C++? Hand coded assembly would be faster if you have a few decades to spare.