views:

581

answers:

6

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.

+4  A: 

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.

Matt Rogish
i don't see how this adds any value to the topic.
levi rosol
i want to clarify that my previous comment came after you initial "fastest gun in the west" post where you posted the first paragraph.
levi rosol
Its pretty darn reliable, and its easy to pull data out of it into a SQL DB for analysis.
rjurney
+1  A: 

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

Robert Gould
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.
levi rosol
+4  A: 

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.

MatthewFord
A: 

I just addressed your question (somewhat) here: http://stackoverflow.com/questions/53693

rjurney
A: 

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

Travis R
+1  A: 

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.

John Munsch
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.
levi rosol