[wildfly-dev] Support for DMR Streams

Richard Opalka ropalka at redhat.com
Mon Jun 13 17:48:39 EDT 2016


Hi All,

The upcoming DMR 1.4.0 version will introduce DMR Streaming API [1] - 
see attachment.

The idea of this new feature grew up while I was working on DMR-9 issue [2].

In short the news in upcoming JBoss DMR 1.4.0 are:
  * it will be compilable on JDK8 and above
  * it will be 100% backward compatible on binary level with previous 
version
  * it replaces old cookcc based parser with new one based on DMR 
Streaming API
  * DMR parsing will be times faster with old model based API
  * new DMR streaming API is highly memory efficient and really very fast

One example on how to use new DMR streaming API can be seen here [3].

I believe this new DMR Streaming API will become very handy for many of us
because it opens new opportunities to decrease memory and CPU usage in 
our core.

At the moment in current prototype [4] I didn't touch DMR object model 
writing yet
because new DMR Streaming API does not (and most probably will not) 
support pretty print feature
(because of its focus on speed and efficiency).
But I'm considering I might fix the object model writing flow when 
pretty print is off.
Fixing it would speed it up significantly. Any objections?

As a final note today I run few benchmarks (see attachments).
Here are some outcomes from benchmark results in short:
  * Writing small DMR structures in DMR format is 2,4 times faster with 
new DMR streaming API
  * Writing small DMR structures in JSON format is 2,6 times faster with 
new DMR streaming API
  * Reading small DMR structures in DMR format is 3,9 times faster with 
old DMR object model API
  * Reading small DMR structures in JSON format is 3,7 times faster with 
old DMR object model API
  * Reading small DMR structures in DMR format is 5 times faster with 
new DMR streaming API
  * Reading small DMR structures in JSON format is 4,4 times faster with 
new DMR streaming API
  * Reading big DMR structures in DMR format is 5,2 times faster with 
old DMR object model API
  * Reading big DMR structures in JSON format is 6 times faster with old 
DMR object model API
  * Reading big DMR structures in DMR format is 7,6 times faster with 
new DMR streaming API
  * Reading big DMR structures in JSON format is 8,8 times faster with 
new DMR streaming API

PS: Hopefully new DMR streaming API will seamlessly integrate with GWT 
(used in our console).

[1] 
https://github.com/ropalka/jboss-dmr/tree/DMR-9/src/main/java/org/jboss/dmr/stream
[2] https://issues.jboss.org/browse/DMR-9
[3] 
https://github.com/ropalka/jboss-dmr/blob/DMR-9/src/main/java/org/jboss/dmr/ModelNodeFactory.java
[4] https://github.com/ropalka/jboss-dmr/commits/DMR-9

Regards,

-- 
Richard Opalka
Principal Software Engineer
JBoss by Red Hat
Mobile: +420 731 186 942

-------------- next part --------------
A non-text attachment was scrubbed...
Name: apidocs.zip
Type: application/zip
Size: 61709 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/wildfly-dev/attachments/20160613/2576ccc8/attachment-0001.zip 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: JBoss-DMR-Big-Structure-Benchmarks.ods
Type: application/vnd.oasis.opendocument.spreadsheet
Size: 26651 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/wildfly-dev/attachments/20160613/2576ccc8/attachment-0002.ods 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: JBoss-DMR-Small-Structure-Benchmarks.ods
Type: application/vnd.oasis.opendocument.spreadsheet
Size: 40191 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/wildfly-dev/attachments/20160613/2576ccc8/attachment-0003.ods 


More information about the wildfly-dev mailing list