Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > XML databinding options?

Reply
Thread Tools

XML databinding options?

 
 
udupi_mail@yahoo.com
Guest
Posts: n/a
 
      01-25-2007
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

 
Reply With Quote
 
 
 
 
Boris Kolpackov
Guest
Posts: n/a
 
      01-25-2007
Hi,

http://www.velocityreviews.com/forums/(E-Mail Removed) writes:

> 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


--
Boris Kolpackov
Code Synthesis Tools CC
http://www.codesynthesis.com
Open-Source, Cross-Platform C++ XML Data Binding
 
Reply With Quote
 
 
 
 
usenet@tech-know-ware.com
Guest
Posts: n/a
 
      01-26-2007
On Jan 25, 3:55 am, (E-Mail Removed) wrote:
Guru wrote:
> 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)
=============================================

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Databinding expressions are only supported on objects that have a DataBinding event jobs ASP .Net 0 09-25-2007 11:54 PM
Gridview encoding, or how to run commands before gridview's default databinding, or, how do I disable default databinding at all? Sergei Shelukhin ASP .Net 1 11-12-2006 01:43 PM
Different results parsing a XML file with XML::Simple (XML::Sax vs. XML::Parser) Erik Wasser Perl Misc 5 03-05-2006 10:09 PM
DataGrid Custom Column Error when DataBinding "does not contain a definition for 'DataBinding'" Earl Teigrob ASP .Net Datagrid Control 1 03-01-2004 04:52 AM
XML query and databinding raheel ASP .Net 2 10-27-2003 01:09 AM



Advertisments