views:

302

answers:

3

Just wonder how good is Propel's support for database sharding? I am thinking about creating my application in PHP, using MySQL as the database server and Propel as the ORM.

I figure out that it may be good to keep the architecture scalable right from the start, just in case my application takes off.

What's your take?

+2  A: 

I think that's a very bad idea. Assuming that you need to shard your data is not a good assumption. You don't know, in advance, how you're going to want to scale. Sharding is a very complicated business and needs to be avoided if at all possible. This is an obscene case of premature optimisation.

MarkR
+1  A: 

I agree with MarkR that it's too early to be worrying about sharding, but I disagree that it should be avoided if at all possible. I'd say go with the ORM that seems to fit your style and language choice -- and Propel is probably the right one in your case. Even if your application takes off in a big way, sharding probably won't be necessary -- you can easily pull off 25 million records with a MySQL-based DBMS and some decent caching techniques, so just focus on making your queries fast and design for easy memcache-integration, and you'll be a happy camper even when your app takes off.

Good luck with it!

Jens Roland
+1  A: 

Propel supports sharding out of the box through connections. check an example here:

http://groups.google.com/group/propel-users/browse_thread/thread/4d19c0668aa17452

Francois Zaninotto