[lcdproc] LCDproc v0.5 development, here we go folks :)

Eric Z. Ayers Eric.Ayers@compgen.com
Thu, 24 Aug 2000 10:41:02 -0400 (EDT)


William W. Ferrell writes:
...
 > Oh, I *REALLY* like this. An XML-based protocol.
 > 
 > This would actually make sense, I think. The only thing missing here is
 > interaction with the server. These widgets get defined initially, but
 > then how doth the server request and receive updates? Something like
 > this, perhaps?:
 > 
 > Server to client:
 > <request>
 >    <update screen="Mem Display"></update>
 > </request>   
 > 
 > Client to server:
 > <update>
 >    <widget name="mem_free">12345k</widget>
 >    <widget name="mem_used">54321k</widget>
 >    <widget name="mem_graph">35%</widget>
 > </update>

yup.

 > 
 > No comments please on my maths here :)
 > 
 > Oh damn XML is cool. This is rediculously simple, and this would make
 > debugging protocol problems *WAY* easy. So now there's just the
 > parser.

That's another reason why you might want to use XML.  You don't really
want to spend time writing the parser yourself.  There are free
libraries  out there to do that, that you could just include in the
source distribution for lcdproc  (I'm thinking gnome libxml for 'C'.)

 > Am I right in assuming that in XML, tags *MUST* have a matching close
 > tag? 

XML parser are very persnickity.  It is POSSIBLE to edit a file by
hand, but one screwup and the parser isn't very forgiving.  There is
none of this lazy tag with no closing tag that HTML allows (I wouldn't
say HTML is wrong, it's just not as strict)

 > I suppose we don't actually have to use tags for absolutely every
 > piece either, unless there's a good reason to do it. I.e. a rewrite of
 > the above config file:
 > 
 > <lcdproc>
 >    <server>
 >       port = 54
 >       max clients = 10

...

 > Am I going in the wrong direction with this, or does the above seem
 > feasible?

It's feasable, but I think you'd just want to use the XML parser stuff
and not sub-parse the stuff inside.  I've been down this road before
with the DENTS project.

 > ...  I must say I like this XML idea. Too
 > bad it'll probally add a good chunk of time to the development
 > cycle :)

Only if you write your own parser, (which doesn't sound like a good
way to spend time)

-Eric.


-----------------------------------------------------------
To unsubscribe from this list send a blank message to
lcdproc-unsubscribe@lists.omnipotent.net