XML databinding options?

U

udupi_mail

Hello,

Was hoping to get some feeback on the following:

Current arch. is a swing client with corba services deployed on AIX.
Data tranferred over the wire is XML(string) instead of traditional
corba datatransfer objects. The corba interface just provides business
methods which take in a parameter of type java.lang.String(xml).
We are using a DOM based xml serializer/deserializer which does the
java<-->xml conversion both on client and server.This works except that
the marshall/unmarshall process is killing us (DOm coupled with
Reflection).

I have been exploring other options for the java xml
databinding(marshall & unmarshall). Is JAXB a good candidate for this
type of architecture? Are databinding frameworks normally used for
synchronous request-response type scenarios (e.g. a thick client(s) and
a server)
Essentially I need something that would work off a xml schema (the xsd
file would define the different payload formats for the req-response
scenario).

Currently xml is used internally btw the client - server, but in the
near future we forsee accepting and transmitting xml feeds to/from
external systems(where validating the instance docs would be
necessary).

Any pointers would be very helpful.

Peace!
Guru
 
B

Boris Kolpackov

Hi,

Current arch. is a swing client with corba services deployed on AIX.
Data tranferred over the wire is XML(string) instead of traditional
corba datatransfer objects. The corba interface just provides business
methods which take in a parameter of type java.lang.String(xml).
We are using a DOM based xml serializer/deserializer which does the
java<-->xml conversion both on client and server.This works except that
the marshall/unmarshall process is killing us (DOm coupled with
Reflection).

I think data binding should work well in your case. The only thing
that you should look for is support for binary serialization (in
addition to XML) from the data binding framework. This way you can
send the XML data as OctetSeq instead of String since sending any
non-trivial XML fragments uncompressed over the wire is slow. Also
the binary encoding will speed up serialization/deserialization
quite a bit.

I don't know any Java data binding tools that support this, but
this is implemented in the C++ framework that I am working on
and people use the binary encoding for over-the-wire transfer
and compact storage all the time.


hth,
-boris
 
U

usenet

I have been exploring other options for the java xml
databinding(marshall & unmarshall). Is JAXB a good candidate for this
type of architecture? Are databinding frameworks normally used for
synchronous request-response type scenarios (e.g. a thick client(s) and
a server)
Essentially I need something that would work off a xml schema (the xsd
file would define the different payload formats for the req-response
scenario).

Data binding will most likely speed up your code. We've experienced
speed
ups as much as 4 times in parsing XML into objects vs. parsing XML into
a
DOM tree. But where you really win is interrogating the data once it
is in
the objects/tree. For data binding at the 'assembly' level it is just
a
couple of pointer dereferences, whereas DOM is iterating through
elements
doing string matches, so the speed up can be enormous (100+ times
faster).

The schemas would obviously have to be fairly static (as they are
compiled
into the code) rather than downloaded on the fly and validated from
there.
I don't know if this is a problem for you.

Not all databinding tools are created equal either. I can't speak
explicitly about JAXB (although on paper it sounds good). The W3C has
been
defining a set of patterns for schema designers to use that will
hopefully
maximise the interoperability of data binding tools. You might want to
compare your schemas against them to get an idea of whether you are
pushing
the envelope or not. You can see their page at:

http://www.w3.org/2002/ws/databinding/

HTH,

Pete.
--
=============================================
Pete Cordell
Tech-Know-Ware Ltd
for XML to C++ data binding visit
http://www.tech-know-ware.com/lmx
(or http://www.xml2cpp.com)
=============================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,054
Latest member
LucyCarper

Latest Threads

Top