The serendipity of JS 1.8.5 being released last week,
as well as packages for both JS 1.8.5 and MongoDB 1.8.0
in Cooker, has made it possible to start talking
publically about using MongoDB with RPM.

MongoDB is a NoSQL! distributed store with a tutorial here:

        http://www.mongodb.org/display/DOCS/Tutorial

And if you happen _NOT_ to be using Cooker and MongoDB 1.8.0
and JS 1.8.5, you can get access to a MongoDB here for "free":

        https://mongohq.com/home

Most of the recent rpm-5.3.x releases have the ability
to generate JSON (and YAML and XML) markup spewage.

E.g. this command dumps all of the metadata from the bash package in JSON:

        rpm -q --json bash

That output is almost, but not quite, ready to be imported using
the mongo shell. I've attached an example input/output to illustrate
the minor editing that needs to be done differently (or fixed in
the mongo shell: afaik --json is emitting valid JSON but perhaps
I've missed some detail reading specs.)

I've also prototyped the JSON analogue of repo-md with these commands:

        rpm -qa --wnh:primary.mongo
        rpm -qa --wnh:filelists.mongo
        rpm -qa --wnh:other.mongo

Most of what remains is knocking out the usual pesky
details on the JSON markup, like utf8 encoding everywhere, and
with syntax adjustments to match up with specific
parsers like the mongo JS shell, as well as the same with all the
usual bindings of MongoDB to every bleeping interpreter.

RPM itself embeds the mongo-c-driver, and will use BSON, not JSON,
so sanitizing the utf8 encoding and adjusting escaping and newlines
with spewage isn't as important as getting some reasonably well
defined schemas with known usage cases (like repo-md) defined
conventionally. I.e. how should databases be named, what identifiers
should be used for distros/packages/files/hosts/users, figgering authentication 
etc, etc.

Any interest in helping with RPM+MONGODB here on the rpm-devel list?

There's *lots* of usage cases for RPM+MONGODBif you just think a bit ...
... consider distributing/loading macro configuration straight from a MongoDB
for one example.

hth

73 de Jeff
======================== input/outout WYSIWYG JSON examples with the mongo shell

Attachment: bash.input
Description: Binary data

Attachment: bash.output
Description: Binary data

Reply via email to