[cgi-wiki-dev] Flat-file backend

Dominic Hargreaves dom at earth.li
Sun Feb 5 17:38:42 GMT 2012


On Fri, Feb 03, 2012 at 07:25:26PM +0000, Ryan Jendoubi wrote:
> I'm thinking of implementing a flat-file backend. As Dom pointed
> out, metadata and versioning would need to be addressed.
> 
> For metadata, I was thinking of using Lucy[0] and storing metadata
> as fields.

Hmm, I'm not too familiar with Lucy, but it looks like quite a heavyweight
solution for this. Would a simple serialisation interface like JSON or
YAML be better?

> As for versioning, I would have one current version of a file
> ("foo.txt"), and previous versions would follow a naming convention
> like "foo__2012-02-03T191540.txt". Moderation could also be
> represented in the filename somehow.
> 
> Additionally, if one didn't want to constrain users from using silly
> node names with long timestamps on the end, the versioned files
> could be kept in a directory named from the node.

Well, W::T currently uses revision numbers rather dates, so your naming
convention would need to store that.

Cheers,
Dominic.

-- 
Dominic Hargreaves | http://www.larted.org.uk/~dom/
PGP key 5178E2A5 from the.earth.li (keyserver,web,email)



More information about the CGI-Wiki-dev mailing list