You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Aleksander Slominski <as...@cs.indiana.edu> on 2001/03/29 05:49:40 UTC

almost as fast as RMI?

hi,

i have read and enjoyed the article about small and fast Electric XML (from
http://www-106.ibm.com/developerworks/xml/library/x-elexml/).

the author at the end of the article states: "(...) the resulting parser
achieves the goal of processing a SOAP message about as quickly as RPC over
RMI.(...)" - i was really intrigued by achieving near RMI performance but
there was no actual code to test and compare with other parsers to check the
performance claim. therefore i have written a simple test that parses SOAP
message mentioned in the article and compares it with my XML Pull Parser
(XPP) - it can be downloaded from:

http://www.extreme.indiana.edu/~aslom/soapParseTest/

results: on Windows 2000 PII450Mhz/256MB with JDK 1.3.1 i have run parsing
100K times and found out that XPP is almost 5 times faster than Electric XML
(it seems like an overhead of DOM alike parsing approach where there is a lot
of elements created to represent parsed tree in memory):

ELECTRIC  100000 iterations in 74.037 [s] (1350 [iteration/s], 0.74
[ms/iteration])
XPP       100000 iterations in 15.282 [s] (6543 [iteration/s], 0.15
[ms/iteration])

i think that when sending Java serialized data by RMI there is much less data
on the wire (at least 10 times - roughly: procedure name + 2 parameter
strings + some overhead) therefore theoretically RMI could be much faster
than SOAP/XML. however in practical situations for small messages that fits
into one IP packet the performance bottleneck is not in CPU but in network
latency.

i think also that it would be interesting to have standard suite of tests to
compare performance of different XML parsers when used in SOAP.

thanks,

alek

ps. here is output of actual test

>java -version
java version "1.3.1-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-beta-b15)
Java HotSpot(TM) Client VM (build 1.3.1beta-b15, mixed mode)

>java -cp .;PullParser.jar;lib\XML-1.1.jar SoapParseTest
SOAP SAMPLE:---
<SOAP-ENV:Envelope
     xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
     xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
     xmlns:xsd="http://www.w3.org/1999/XMLSchema">
     <SOAP-ENV:Body>
        <ns1:getRate xmlns:ns1="urn:demo1:exchange"

SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
           <country1 xsi:type='xsd:string'>USA</country1>
           <country2 xsi:type="xsd:string">japan</country2>
        </ns1:getRate>
     </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

---

ELECTRIC  100000 iterations in 74.037 [s] (1350.676013344679 [iteration/s],
0.74037 [ms/iteration])
XPP  100000 iterations in 15.282 [s] (6543.646119617851 [iteration/s],
0.15282 [ms/iteration])


--
Aleksander Slominski, LH 316, IU, http://www.extreme.indiana.edu/~aslom
As I look afar I see neither cherry Nor tinted leaves Just a modest hut
on the coast In the dusk of Autumn nightfall - Fujiwara no Teika (1162-1241)



---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


RE: almost as fast as RMI?

Posted by graham glass <gr...@mindspring.com>.
hi alex,

your approach is very interesting.

since XPP does not maintain any record of what it
has seen (except for namespace declarations i presume),
the application code has to be responsible for
tracking attributes, elements, etc. i wonder if
what you gain up-front in terms of reading in
the data quickly is lost on the back-end inside
the application logic? as long as the input is
simple and relatively predictable, it's quite
possible that this is not an issue.

i am going to think about whether electric XML
could be enhanced to provide a pull-model as well,
and will post any findings.

cheers,
graham

-----Original Message-----
From: Aleksander Slominski [mailto:aslom@cs.indiana.edu]
Sent: Wednesday, March 28, 2001 9:50 PM
To: soap-user@xml.apache.org
Cc: SoapRMI
Subject: almost as fast as RMI?


hi,

i have read and enjoyed the article about small and fast Electric XML (from
http://www-106.ibm.com/developerworks/xml/library/x-elexml/).

the author at the end of the article states: "(...) the resulting parser
achieves the goal of processing a SOAP message about as quickly as RPC over
RMI.(...)" - i was really intrigued by achieving near RMI performance but
there was no actual code to test and compare with other parsers to check the
performance claim. therefore i have written a simple test that parses SOAP
message mentioned in the article and compares it with my XML Pull Parser
(XPP) - it can be downloaded from:

http://www.extreme.indiana.edu/~aslom/soapParseTest/

results: on Windows 2000 PII450Mhz/256MB with JDK 1.3.1 i have run parsing
100K times and found out that XPP is almost 5 times faster than Electric XML
(it seems like an overhead of DOM alike parsing approach where there is a
lot
of elements created to represent parsed tree in memory):

ELECTRIC  100000 iterations in 74.037 [s] (1350 [iteration/s], 0.74
[ms/iteration])
XPP       100000 iterations in 15.282 [s] (6543 [iteration/s], 0.15
[ms/iteration])

i think that when sending Java serialized data by RMI there is much less
data
on the wire (at least 10 times - roughly: procedure name + 2 parameter
strings + some overhead) therefore theoretically RMI could be much faster
than SOAP/XML. however in practical situations for small messages that fits
into one IP packet the performance bottleneck is not in CPU but in network
latency.

i think also that it would be interesting to have standard suite of tests to
compare performance of different XML parsers when used in SOAP.

thanks,

alek

ps. here is output of actual test

>java -version
java version "1.3.1-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-beta-b15)
Java HotSpot(TM) Client VM (build 1.3.1beta-b15, mixed mode)

>java -cp .;PullParser.jar;lib\XML-1.1.jar SoapParseTest
SOAP SAMPLE:---
<SOAP-ENV:Envelope
     xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
     xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
     xmlns:xsd="http://www.w3.org/1999/XMLSchema">
     <SOAP-ENV:Body>
        <ns1:getRate xmlns:ns1="urn:demo1:exchange"

SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
           <country1 xsi:type='xsd:string'>USA</country1>
           <country2 xsi:type="xsd:string">japan</country2>
        </ns1:getRate>
     </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

---

ELECTRIC  100000 iterations in 74.037 [s] (1350.676013344679 [iteration/s],
0.74037 [ms/iteration])
XPP  100000 iterations in 15.282 [s] (6543.646119617851 [iteration/s],
0.15282 [ms/iteration])


--
Aleksander Slominski, LH 316, IU, http://www.extreme.indiana.edu/~aslom
As I look afar I see neither cherry Nor tinted leaves Just a modest hut
on the coast In the dusk of Autumn nightfall - Fujiwara no Teika (1162-1241)



---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


RE: almost as fast as RMI?

Posted by graham glass <gr...@mindspring.com>.
hi alex,

your approach is very interesting.

since XPP does not maintain any record of what it
has seen (except for namespace declarations i presume),
the application code has to be responsible for
tracking attributes, elements, etc. i wonder if
what you gain up-front in terms of reading in
the data quickly is lost on the back-end inside
the application logic? as long as the input is
simple and relatively predictable, it's quite
possible that this is not an issue.

i am going to think about whether electric XML
could be enhanced to provide a pull-model as well,
and will post any findings.

cheers,
graham

-----Original Message-----
From: Aleksander Slominski [mailto:aslom@cs.indiana.edu]
Sent: Wednesday, March 28, 2001 9:50 PM
To: soap-user@xml.apache.org
Cc: SoapRMI
Subject: almost as fast as RMI?


hi,

i have read and enjoyed the article about small and fast Electric XML (from
http://www-106.ibm.com/developerworks/xml/library/x-elexml/).

the author at the end of the article states: "(...) the resulting parser
achieves the goal of processing a SOAP message about as quickly as RPC over
RMI.(...)" - i was really intrigued by achieving near RMI performance but
there was no actual code to test and compare with other parsers to check the
performance claim. therefore i have written a simple test that parses SOAP
message mentioned in the article and compares it with my XML Pull Parser
(XPP) - it can be downloaded from:

http://www.extreme.indiana.edu/~aslom/soapParseTest/

results: on Windows 2000 PII450Mhz/256MB with JDK 1.3.1 i have run parsing
100K times and found out that XPP is almost 5 times faster than Electric XML
(it seems like an overhead of DOM alike parsing approach where there is a
lot
of elements created to represent parsed tree in memory):

ELECTRIC  100000 iterations in 74.037 [s] (1350 [iteration/s], 0.74
[ms/iteration])
XPP       100000 iterations in 15.282 [s] (6543 [iteration/s], 0.15
[ms/iteration])

i think that when sending Java serialized data by RMI there is much less
data
on the wire (at least 10 times - roughly: procedure name + 2 parameter
strings + some overhead) therefore theoretically RMI could be much faster
than SOAP/XML. however in practical situations for small messages that fits
into one IP packet the performance bottleneck is not in CPU but in network
latency.

i think also that it would be interesting to have standard suite of tests to
compare performance of different XML parsers when used in SOAP.

thanks,

alek

ps. here is output of actual test

>java -version
java version "1.3.1-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-beta-b15)
Java HotSpot(TM) Client VM (build 1.3.1beta-b15, mixed mode)

>java -cp .;PullParser.jar;lib\XML-1.1.jar SoapParseTest
SOAP SAMPLE:---
<SOAP-ENV:Envelope
     xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
     xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
     xmlns:xsd="http://www.w3.org/1999/XMLSchema">
     <SOAP-ENV:Body>
        <ns1:getRate xmlns:ns1="urn:demo1:exchange"

SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
           <country1 xsi:type='xsd:string'>USA</country1>
           <country2 xsi:type="xsd:string">japan</country2>
        </ns1:getRate>
     </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

---

ELECTRIC  100000 iterations in 74.037 [s] (1350.676013344679 [iteration/s],
0.74037 [ms/iteration])
XPP  100000 iterations in 15.282 [s] (6543.646119617851 [iteration/s],
0.15282 [ms/iteration])


--
Aleksander Slominski, LH 316, IU, http://www.extreme.indiana.edu/~aslom
As I look afar I see neither cherry Nor tinted leaves Just a modest hut
on the coast In the dusk of Autumn nightfall - Fujiwara no Teika (1162-1241)



---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org