What do you need to take into consideration when deciding between MySQL and Amazon's SimpleDB for a RoR app?
Asked Answered
T

5

9

I am just beginning to do research into the feasibility of using Amazon's SimpleDB service as the datastore for RoR application I am planning to build. We will be using EC2 for the web server, and had planned to also use EC2 for the MySQL servers. But now the question is, why not use SimpleDB?

The application will (if successful) need to be very scalable in terms of # of users supported, will need to maintain a simple and efficient code base, and will need to be reliable.

I'm curious as to what the SO communities thoughts are on this.

Titanic answered 2/10, 2008 at 16:16 Comment(1)
I just addressed your question (somewhat) here: stackoverflow.com/questions/53693Siskind
A
4

The Ruby SimpleDB library is not as complete as ActiveRecord (the default Rails DB adapter), so many of the features you're used to will not be there.

On the plus side it's schemaless, scalable and works well with ec2.

If you're going to do things like full text search in your app then SimpleDB might not be the best choice, stick with AR + sphinx.

Accident answered 2/10, 2008 at 16:54 Comment(0)
R
4

Well, considering simple DB doesn't use SQL, or even have tables, means that it's a completely different beast than MySQL and other SQL-based things (http://aws.amazon.com/simpledb/). There are no constraints, triggers, or joins. Good luck.

Here's one way of getting it up and running: http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1242 (via http://rubyforge.org/projects/aws-sdb/ )

I suppose if you're never going to need to query the data outside of rails, then SimpleDB may prove to be OK. But as it's not a first-class supported DB, you're likely to run into bugs that are difficult to fix. I wouldn't want to run a production rails app in a semi-beta backend.

Rowlock answered 2/10, 2008 at 16:20 Comment(3)
i don't see how this adds any value to the topic.Titanic
i want to clarify that my previous comment came after you initial "fastest gun in the west" post where you posted the first paragraph.Titanic
Its pretty darn reliable, and its easy to pull data out of it into a SQL DB for analysis.Siskind
A
4

The Ruby SimpleDB library is not as complete as ActiveRecord (the default Rails DB adapter), so many of the features you're used to will not be there.

On the plus side it's schemaless, scalable and works well with ec2.

If you're going to do things like full text search in your app then SimpleDB might not be the best choice, stick with AR + sphinx.

Accident answered 2/10, 2008 at 16:54 Comment(0)
S
2

To me this just feels like, "Hey there are these neat tools out there, I should go build a project using them," rather than actually needing to use these specific tools. Maybe I'm just being crabby but it feels like a classic case of premature optimization. You're trying to use an external service that costs money for an app that isn't even written yet and you don't say you've got a guaranteed audience or one that will necessarily scale to a level that warrants that.

"The application will (if successful) need to be very scalable in terms of # of users supported", seriously, that describes half the Internet. It's the "if successful" part that's really the question. Just concentrate on building the application quickly and easily. The easiest way to do that is just use ROR as it is out-of-the-box so to speak. Pair it with a database, use ActiveRecord and get something built and attracting users.

In fact, I'll go further and say that EC2 is rather expensive for always on servers. Deploy it over on Slicehost or another hosted solution and then move it to EC2 if you need to in order to support demand.

Sycophancy answered 20/5, 2009 at 18:2 Comment(1)
great feedback, and as you described, there was a certain amount of "premature optimization" going on here. At this time the application is hosted on my dedicated server that I've had for years, and is using mySQL. If/when the need comes, it'll move to the AWS services.Titanic
V
1

I myself am very interested in this topic. Right now I'm on a cloud computing high so I'd say go with SimpleDB since it'll probably scale better in the sense that you'll have high availability, but that's just my thoughts as of the moment. Not from experience yet.

Edit: It's true that SimpleDB has no normal features a "normal" database, but it should do the trick if you only need a simple CRUD layer to work against, which is my case

Verruca answered 2/10, 2008 at 16:21 Comment(1)
as am I. not that i'm trying to build this app using 100% AWS services, but SimpleDB and SQS are the only two not getting used. From what i have read, if you go the route of using SimpleDB, using SQS is a no brainer.Titanic
S
0

There's a library called SimpleRecord that is a drop in replacement for ActiveRecord, but uses SimpleDB as its backend data store.

Semblable answered 20/5, 2009 at 17:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.