This project is read-only.

Content Id is only an int

Topics: General
Mar 29, 2011 at 5:35 PM

I'm just working on a Part that references a content item Id - so I checked the data type. Currently, Content Items have an int Id.

An int value gives us a range of over 4 billion (assuming negative values are used). This sounds like a lot and of course it's far out of the range of what most standard blog sites will ever need.

But for true scalability is that really going to be enough? Considering that pretty much everything in Orchard is a content item of some sort, that is the total limit of items of any kind in an Orchard database. Coupled with a multi-tenant scenario, can we really put such an arbitrary limit on how much content an Orchard website might one day contain?

Let's look at an example. How many users do you think there are on Facebook? How many messages, status updates, wall posts etc. do you think the average user has written? Let's say there are a million users, and each of them has posted a thousand items of content. That's 1 billion content records right there; and I'd say those are extremely conservative estimates when dealing with something like Facebook!

It's not a limit I'm worried about right now; and it could be argued that for an application that size you should really be building everything from scratch, not using a CMS framework. But might it be an idea to give this some consideration now, before it becomes a major breaking change at some point in the future?

Mar 29, 2011 at 10:18 PM

Yes, this has been raised before. As you said, we don't even know how the system would behave under such scale.