views:

20

answers:

2

Well, I've been searching for good DB solution for my startup idea. I won't create one more topic "Which DB is the best ever?!", but I'll ask one other thing.

So, I haven't found any good horizontal-scalable DB written in C++. Why C++? Of course, there are Cassandra if you need document-store and Voldemort if you need key-value storage. But both of them are written in Java, so, small project would have to pay more for big amounts of RAM for non-swaping JWM. That's not good enough.

On the other hand - we can write own own DHT-system (without NAT transfer - if you think your project will be located it many servers around the world - this topic is not about it). It will be a bit slower, I suppose, that Cassandra does, but I'll get rid of Java and will get profit from that. So, I'll use smt like MongoDB or Tokyo Cabinet. (The speed test seem to give nearly same results, so here are the fastest storages I found).

So, the questions:

  1. Small project can't pay for large amount of RAM, but need efficient solution and should have an ability to become big project that needs horizontal-scalable. We should:

    a) create a non-scalable stuff and if it would work great any you'll need scalable server, rewrite in using something like Cassandra.

    b) write using complex huge instruments (on Java) and have low performance.

    c) write something on your own using non-scalable DBase and own DTH and make it better while developing.

  2. Java is a really RAM-monster?

  3. What seems to be better for hi-loaded project (if Cassandra has no horizontal-scalability): MongoDB or Cassandra?

  4. Does Cassandra have any need in cache-level? (like using Redis) Or it has it's own algorithms?

Thanks, beforehand.

Add:

What I really ask for? Cassandra seems to be a bit slower and be, as I said, a 'Ram-monster' good for home applications but not really good for server, but can be horizontaly scaled. And that's what I really ask for: own DHT + mongodb or cassandra?

A: 

If it's such a big issue, what you probably want to do is abstract the database away from your actual app. So if you want to start out with something boring and easy to set up like MySQL, you can do that. And if you start to outgrow that, you can easily swap in a different storage layer.

I'm not a database expert, but MySQL is boring and tested and can be made to scale horizontally, so I would recommend it.

interfect
A: 

The sane options are "use sqlite or postgresql or something I already know to ramp up faster" or "use cassandra now so I don't have to pay a switching cost later." Notably, "Write my own DHT" is not present there. :)

I know of at least one site that went live with Cassandra on a 128MB VM. Of course the amount of traffic you're going to be able to handle on that is pretty limited -- but it worked for them.

Cassandra has sophisticated caching built in, and many sites have been able to replace both mysql + memcached with just Cassandra.

jbellis