One of the primary challenges in putting together a good content management system is building a decent permissions model. Whether a particular user or process is able to perform some kind of an action upon a resource or not can be remarkably difficult to establish, especially when there are multiple constraints involved. For an XML-based CMS, this can be even more of a challenge, because the n-dimensional nature of such a constraint model is often difficult to model in hierarchical structures.
However, RDF is far more ideally suited for this particular role. A permissions system is, at its core, a set of assertions about who can do what to what, which fits nicely with the “subject predicate object” model that RDF exemplifies. Moreover, because such models are sparse — the number of assertions is likely to be very small compared to the total potential assertions that are possible — this fits nicely into models where sparseness of data is a common characteristic (again, RDF), as compared to storing this information (expensively) in tabular fields as with a relational database.
I’m working on building an XML-based CMS (specifically on a MarkLogic platform, though I would like to keep it portable), and realized as I was working on it that while the user permissions system that MarkLogic employs is powerful, it’s not portable and there are facets that don’t fit nicely into that particular model. Thus, I decided to chase the RDF triples approach to see if that would work better for this. (The end product may very well be a hybrid approach to take advantage of fast queries, but that’s beyond the scope of this particular article).
Read more