views:

105

answers:

4

I'm porting a website that I made for app engine to run on a dedicated server. It is coded in java and I'm looking for a database to replace google datastore.

My first thougt was MySql because everybody uses it, but i dont like SQL and I think I would feel more comfortable using OODB or anything else.

With google datastore I could modify my models and don't worry about the database definition at all. I know using MySql that isn't possible. And I don't want to miss that.

And if I use a OODB, which should I use? What about performance compared to MySql?

Well, any idea or tip will really help me since I know nothing about databases.

Edit: about the data the site handles, it's a microblogging site on a Twitter style but where posts has it's comments. About the amount of data, only future will tell, but I'm building it as if it will become popular, of course.

Edit 2: The application is not using JDO/JPA now, I just made a small layer around the app-engine datastore low-level api.

Edit 3: I wonder if I could use db4o? Is it a right choice for a website to use db4o?

+2  A: 

I don't know google datastore features, but I want to give my two eurocents. Without knowing your current and future expected data usage patterns, it's difficult to say. One thing which is clear is knowledge. All the SQL solutions out there (and in particular MySQL and Postgres) are solid and documented for performance, usage, quirks. You know what you are getting into, and any trouble you can have, most likely already happened and was solved. With other solutions, you are more on your own.

Keep this into account. not a full answer, just an opinion.

Stefano Borini
A: 

In your app engine version, did you use the JDO or JPA APIs? If so, you can continue to use those with a SQL backend. Datanucleus supports many different backends for their JDO and JPA apis.

Peter Recore
Neither one. I used the datastore API
Damian
No, I just made a small layer around the low level api: http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/package-summary.html
Damian
@ecounysis there is a low level API that does not use JDO or JPA.
Peter Recore
A: 

According to Google:

Google App Engine includes support for two different API standards for the datastore: Java Data Objects (JDO) and Java Persistence API (JPA). These interfaces are provided by DataNucleus Access Platform, an open source implementation of several Java persistence standards, with an adapter for the App Engine datastore.

http://code.google.com/appengine/docs/java/gettingstarted/usingdatastore.html

Based on this I would suggest looking at JDO and DataNucleus to provide data persistence. Especially since you want essentially the same functionality as that provided by the App Engine.

ecounysis
I will edit the question again, I haven't used JDO/JPA, I just made a small layer around the low level api: http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/package-summary.html
Damian
You should try JDO and DataNucleus to solve your problem. I don't think you're going to find a clone of Google's com.google.appengine.api.datastore package.
ecounysis
I'm not looking for a clone, I will rewrite the database related code, that's why I'm looking for possible databases.
Damian
+1  A: 

Well, after some research I found out that db4o is not a good choice for websites because it can't handle high concurrency (I contacted support and that's what they said to me)

The best choice seems to be MongoDB, because it's very similar to google's datastore low level api: It's schema-less, document-oriented, the queries are relatively powerful, it's fast and scales well, full index support.

I analyzed a lot of options and this seems to be the best for this case.

Damian