From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7b97e385047500eb X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Daniel W" Newsgroups: comp.lang.ada References: <41af8365@news.wineasy.se> <2426353.SD16GYvm6f@linux1.krischik.com> <41b02dfe$0$25046$ba620e4c@news.skynet.be> <41b0cfc3$1@news.wineasy.se> <41b0f749$0$25068$ba620e4c@news.skynet.be> Subject: Re: Experiences of XML parser generators for Ada? X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 NNTP-Posting-Host: sth-2-nat-212.116.78.13-lottingelund-cpe.globecom.net X-Original-NNTP-Posting-Host: sth-2-nat-212.116.78.13-lottingelund-cpe.globecom.net Message-ID: <41b3f539$1@news.wineasy.se> Date: 6 Dec 2004 06:59:21 +0100 X-Trace: wineasy!newsfeed.wineasy.se!news.wineasy.se!news.songnetworks.se 1102312761 212.116.78.13 (6 Dec 2004 06:59:21 +0100) X-Complaints-To: abuse@songnetworks.se Path: g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!news100.image.dk!fi.sn.net!newsfeed2.fi.sn.net!wineasy!newsfeed.wineasy.se!news.wineasy.se!news.songnetworks.se!not-for-mail Xref: g2news1.google.com comp.lang.ada:6792 Date: 2004-12-06T06:59:21+01:00 List-Id: OK, let me just clarify what the application I'm looking at is all about. I am involved in an effort where a government agency has to define a protocol (syntax and semantics) with which subsystems developed by several different industries shall communicate. TCP/IP is applicable as transmission level protocols, but on top of that the messages to be passed between subsystems need to be specified specifically for this purpose. The transmission between subsystems is within a safety critical system. We choose to model the syntax of the messages in XML schema, basically on the (delivered) assumption that it provides good modelling tools that let the domain experts see through to the domain stuff, and on the (yet to be proven) assumption that the schema could be used to automatically generate the parser (for the receiving end) and the generator (for the sending end) in a fairly arbitrary programming language with reasonable preformance, without to much requirements for run-time environments ((e.g. minimal limitations on hw/RTOS). We are now basically through the domain stuff and would want to see our assumptions confirmed. /Daniel "Adrien Plisson" wrote in message news:41b0f749$0$25068$ba620e4c@news.skynet.be... > Daniel W wrote: >> Thank you for your succinct clarification. More specifically I'm asking >> for persons with experience of the parser generator. I actually have >> XMLBooster downloaded, but as I said, I'm sort of short on experience.... >> :-) > > well, i don't have any experience with parser generator (excepted with > lex), but i would like to share my experience: > > i designed a software composed of 2 parts. all parts were written in a > different language, and each part was executing in its own context (think > of 2 different computers). i choosed XML as the format for marshaled data > accross the communication medium. > > i first downloaded a standard XML parser (Xerces) and tried it. it was so > slow that i could not continue with it. since i was only using a subset a > XML (no dtd, no validation, no entity reference, only one encoding), i > decided to write my own XML parser and XML generator. i got 70x > performance boost. > > now if i look back, i think it would have been better if i had defined my > own protocol and not used XML: > - the xml fragment were all generated then parsed by software under my > control, no user intervention. so there was no need for something human > readable. > - i was mostly transmitting numeric values. since xml is a text format, > performances were teared down by all the conversions from binary to string > and back to binary. > - since i was mostly transmitting numeric values, all my text nodes were > shorter than the xml element type enclosing those values. this leads to > HUGE overhead. e.g.: 84 encoded in > Unicode is 84 bytes long, but the value expressed here is only 1 byte > long. > - the only thing xml allowed me was extensibility at no cost, in a case > were i was not really needing it. > > so here comes my advice: think twice before using xml. > xml is a very powerful tool for DYNAMICALLY STRUCTURED HUMAN READABLE > TEXT. for everything else, a basic binary protocol with some well defined > rules to follow (endianness, size of data) will really be more efficient. > plus, a basic binary protocol do not need complicated parsers... > > here was my experience, i hope you find it useful. > > -- > rien >