need your feedback on configuration file format

27 views
Skip to first unread message

thomas bonfort

unread,
Aug 15, 2011, 5:54:45 AM8/15/11
to mod-geocache
Hi all,
I'm pondering on changing the configuration file syntax from xml to
another format, and would like to have your feedback before proceeding
any further (there's already a json parser in trunk) . Even a short
unargumented answer or +1 / -1 on each possibility is fine, I'd like
to get a global sense wether it's worth the effort.

Here are the pros and cons of each of the possible formats:

xml: the original format. XML was chosen so it would be possible to
tinker with source capabilitites documents, although this is not an
actual usecase (yet?) :
+ parser already written, format is in use
- verbose syntax (need to write closing tags, quote strings, ..)
+/- rather well structured, except when defining arrays (e.g. extents
or resolutions)

json: http://code.google.com/p/mod-geocache/source/browse/trunk/geocache.json
+ parser already written
- users will need to convert from xml
+ well structured
+/- less verbose than xml, but the need for quoted keys and [] {}
separators makes the final result not very legible
+/- json spec does not allow comments, although the included
mod-geocache parser has been patched to support them.

yaml: http://code.google.com/p/mod-geocache/source/browse/trunk/static/geocache.yaml
+ in my opinion the most legible and pleasant format for hand-editing
+ well structured (arrays, comments, lists, etc..)
- users will need to convert from xml
- added dependency on libyaml (although we could imagine including it
in the source distribution)
- parser not written, and rather complex to implement

other: flex/bison custom format
+ can be made legible, and close to the already known mapserver syntax
+ no external dependency
- parser not written
- users will need to convert from xml
- difficult to programmatically generate config files

regards,
Thomas

Lime, Steve D (DNR)

unread,
Aug 15, 2011, 11:22:50 AM8/15/11
to mod-ge...@googlegroups.com
XML seems sufficient to me especially since it's: 1) working and 2) reasonably readable. I don't see
anything in the +'s for the other formats that would really warrant the investment. My 2 cents.

Steve

regards,
Thomas

--
You received this message because you are subscribed to the Google Groups "mod-geocache" group.
To post to this group, send email to mod-ge...@googlegroups.com.
To unsubscribe from this group, send email to mod-geocache...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mod-geocache?hl=en.

JS

unread,
Aug 15, 2011, 11:26:40 AM8/15/11
to mod-ge...@googlegroups.com
XML will also make it pretty easy to programmatically maintain the config...if that counts for anything.

Jerl

Peter Hopfgartner

unread,
Aug 15, 2011, 11:57:48 AM8/15/11
to mod-ge...@googlegroups.com

Personally, I've found the XML quite reasonable to edit.

My 1.99 c:

xml: +1
yml: 0
json: 0
custom parser: -1

Peter
R3 GIS
http://www.r3-gis.com

Yewondwossen Assefa

unread,
Aug 15, 2011, 12:44:26 PM8/15/11
to mod-ge...@googlegroups.com
I also find the xml editing ok. The complexity for first time users is more of understanding  the links between elements, but once that is passed, xml is as good as other formats to edit.
+1 xml
-0 json
0 yaml

Jeff McKenna

unread,
Aug 15, 2011, 1:07:56 PM8/15/11
to mod-ge...@googlegroups.com
I am happy with the xml format - including the good documentation on the
wiki (http://code.google.com/p/mod-geocache/wiki/ConfigurationFile).

-jeff

thomas bonfort

unread,
Aug 16, 2011, 3:38:26 AM8/16/11
to mod-ge...@googlegroups.com
Thanks all for your feedback, the message is clear :)
I'll remove the json stuff from trunk.

regards,
thomas

Jean-François Gigand

unread,
Aug 16, 2011, 4:12:04 PM8/16/11
to mod-ge...@googlegroups.com
Hi,

I'm happy with XML, although as a human, I would prefer YAML.

But my first concern is the speed. If I have thousands of sources and
tilesets and need to restart Apache often, one more second for loading
the config matters to me.

+1 xml
0 json
+1 yaml
0 custom


Jean-François Gigand - Geonef
Paris, France - http://geonef.fr/


2011/8/16 thomas bonfort <thomas....@gmail.com>:

Reply all
Reply to author
Forward
0 new messages