Re:Mongrel2 Says, "Goodbye Python"
by alexgartrell on Tuesday September 21, 2010 @11:12AM
(#1712875)
The mongrel2 configuration architecture makes it pretty easy to write a libconfig configuration shell. All it would need to do is translate the libconfig stuff to sqlite.
If using libconfig is a good idea, it'll win.
P.s. imho, this is the cool thing about the Mongrel2 stuff. The good ideas can always win, because there really just isn't a whole lot to Mongrel2-core, and everything else is decoupled.
I thought about something like that, but wanted to duplicate the existing config file format so that people's configs would keep working (mostly). It actually had some cool advantages, like a nice psuedo variable system letting you setup variables for reuse in different parts of the config file.
I haven't really seen that in other config formats, and it is damn handy.
libconfig has include directives, is far more useful to multi-instance setups. Plus you get a full type system, all in a 33k binary.
YAML has a variable system: http://www.yaml.org/spec/1.2/spec.html#id2786196
Re:Mongrel2 Says, "Goodbye Python"
by thaumaturgy on Tuesday September 21, 2010 @02:26PM
(#1713557)
I do that in the readable config file format I wrote for another web backend, and it is hella useful.
Please compare the libconfig test file to the mongrel configuration file:
http://www.hyperrealm.com/libconfig/test.cfg.txt
http://mongrel2.org/doc/tip/docs/manual/book.wiki#x1-190003....
The mongrel conf is a subset of libconfig; it doesn't use the more advanced features. Plus libconfig has bindings and versions of it in nearly every mainstream language.
[1]http://www.hyperrealm.com/libconfig/libconfig.html