Originally written 10/16/2012 (Tuesday)
RDF can be stored pretty easily in JSON using JSON-LD. Graphs with multiple subjects look like arrays in JSON-LD, and it seems that MongoDB looks inside arrays in ways that might be convenient. Unfortunately MongoDB does not run on Windows XP, so I have to get a new machine or use my daughter's Mac to experiment. Contrary to what I feared, MongoDB also has a (somewhat) reasonable way of expressing queries using JSON independently of the programming API. You basically construct the abstract syntax tree of your query as a set of nested JSON objects – primitive but workable, I think.
The number of PaaS offering out there is impressive – OpenShift, Appfog, DotCloud and so on. OpenShift looks like an interesting option for deploying Python+MongoDB. I’m guessing that OpenShift might require a bit more work than GAE – for example what do you do about users – but it feels more open, with more choice.
Disappointingly, I was not able to get MongoDB to create a
document whose root is an array. It created multiple documents instead. This means that the "compact form" of expressing RDF data in JSON cannot be used with MongoDB. This may not matter since there are some advantages to using the expanded form.