XML databinding options?

Discussion in 'XML' started by udupi_mail@yahoo.com, Jan 25, 2007.

  1. Guest

    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
     
    , Jan 25, 2007
    #1
    1. Advertising

  2. Hi,

    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
     
    Boris Kolpackov, Jan 25, 2007
    #2
    1. Advertising

  3. Guest

    On Jan 25, 3:55 am, 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)
    =============================================
     
    , Jan 26, 2007
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    289
  2. Cliff  Martin
    Replies:
    1
    Views:
    3,084
    Larry Smith
    Jan 31, 2007
  3. jobs
    Replies:
    0
    Views:
    1,774
  4. jacksu
    Replies:
    0
    Views:
    538
    jacksu
    Oct 9, 2007
  5. Earl Teigrob
    Replies:
    1
    Views:
    446
    Shravan
    Mar 1, 2004
Loading...

Share This Page