Setting up a OpenVZ/MongoDB/YAWF VE

The YAWF framework is available from CPAN, but it still needs a Webserver and some environment for working at it's best. This tutorial shows everything needed to set up a new OpenVZ VE (VServer) with MongoDB and YAWF framework on an existing OpenVZ host.


New YAWF::Object::MongoDB on CPAN

The MongoDB abstraction layer YAWF::Object::MongoDB finally made it's version 0.02 release to CPAN yesterday.

A lot of bugs have been fixed, some minor, some major and many new tests have been added.

The new version supports grouping of (top level) keys:

use YAWF::Object::MongoDB (   keys       => [     {         birch => 1,         oak   => 1,         color => 1,     },     {         deer => 1,         boar   => 1,         color => 1,     },
This will push birch, oak and color in one group (group 0) and deer, boar and color in another group (group 1).

While fetching a document out of the database using ->new(), all the keys from group 0 will be fetched. Accessing one of the keys from another group (1 or higher) will add all the keys from their group(s). "color" is part of two groups, it will be fetched if either group is being requested.

Accessing any undefined key using get_column() will download the whole database document.

This is very new and even if a test script is there and it passes, there might be bugs and issues. Grouping isn't currently part of the POD documentation and using ->list will still ignore it. Please test it and comment and once I consider it to be some kind of "stable", I'll add it to POD.