IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
Expand all | Collapse all

Large XML handling - Issue

  • 1.  Large XML handling - Issue

    Posted 04/25/12 11:56 AM

    Hi,

    We have a requirement to process a huge (1GB) XML file in webMethods.
    Given below is the sample XML and wM code to process the huge file using ‘nodeIterator’ approach.

    Sample XML:



    Item 1
    100
    100.00


    Item 2
    200
    200



    Item 100000
    700
    700.00

    wM Code:

    1.11 pub.file:getFile (Input → loadAs = “stream”)
    1.12 pub.xml:xmlStringToXMLNode (Input → filestream)
    1.13 pub.xml:getXMLNodeIterator (Input → criteria = “OrderItem”)
    1.14 SplitProcess:Repeat
    1.141 pub.xml:getNextXMLNode
    1.142 Branch on ‘/next’
    1.1421 $null:EXIT “SplitProcess”
    1.1422 $default:SEQUENCE
    1.14221 pub.xml:xmlNodeToDocument
    1.14222 pub.xml:documentToXMLString
    1.14223 processOrderItem

    When we tested the code with 25MB file, the processing took about 13secs.
    However, when we gradually increased the size to 250MB, the processing took about 1hr 20mins, and it affected the server performance severely and the processing became horrendously slow.

    Any inputs to the below questions will be of great help:

    1. Are we loading the entire data into the memory as per this approach?
    2. If yes, what would be the alternate way to process this data.
    3. Similar to ‘LargeFileHandling’ in EDI, can we process this data in chunks by writing to an alternate hard disk location.

    We have referenced to below link while deciding the approach.
    [URL]wmusers.com

    Thanks,
    Bot


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: Large XML handling - Issue

    Posted 04/26/12 12:49 AM

    Are you using moving window property? If not set movingWindow to “true” in pub.xml:getXMLNodeIterator service. It will disregards old nodes in memory

    Regards,
    Saravanan.E


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 3.  RE: Large XML handling - Issue

    Posted 04/26/12 08:28 AM

    Hi Saravanan,

    Thanks for the reply.

    Currently, we have the movingWindow property set to true.

    Earlier, we processed a 250MB file without setting the property and the processing took about 1hr 20mins.

    After setting the property to true, a 125MB file took about 1min 2secs to process.

    There is definitely a noticeable difference in performance.

    However, we had tested it when the server memory usage was around 90% which was consumed by other processes.

    Will run further tests with larger files and provide an update.

    Meanwhile, any inputs to the below questions is highly appreciated:

    1. Are we loading the entire data into the memory as per this approach?
    2. If yes, what would be the alternate way to process this data.
    3. Similar to ‘LargeFileHandling’ in EDI, can we process this data in chunks by writing to an alternate hard disk location.

    Regards,
    Bot


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 4.  RE: Large XML handling - Issue

    Posted 04/26/12 09:08 PM
    1. Are we loading the entire data into the memory as per this approach?

    if we use movingWindow - true then you are loading only current node in memory. Old nodes will be disregard

    1. If yes, what would be the alternate way to process this data.
    2. Similar to ‘LargeFileHandling’ in EDI, can we process this data in chunks by writing to an alternate hard disk location.

    Other way is you can split each node and publish to broker and subscribe the document in multiple IS
    Regards,
    Saravanan.E


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 5.  RE: Large XML handling - Issue

    Posted 04/27/12 09:34 PM

    We moved our service to WebLogic because webMethods couldnt handle 25MB size XML.


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 6.  RE: Large XML handling - Issue

    Posted 04/27/12 11:54 PM

    As you can see above, IS can handle large XML documents, if the integration is designed and implemented correctly.

    Two key concepts are needed: 1) don’t load the entire document into memory. Instead iterate over the nodes 2) implement a mechanism for processing individual records/documents in parallel.

    Generic statements such as “X couldn’t handle Y” are usually incorrect if X is in the hands of a person with the right skills and experience.

    Mark


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 7.  RE: Large XML handling - Issue

    Posted 04/30/12 08:46 AM

    Hi Saravanan,

    Thanks for the confirmation!

    Regards,
    Bot.


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 8.  RE: Large XML handling - Issue

    Posted 04/30/12 07:21 PM

    Not a true statement. I have seen XML files almost 200 times the size mentioned above processed in WM with no issues under 30 secs.

    As Mark mentioned above, If you have the right person with the skills and experience they will make it happen.

    Cheers,
    Akshith


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 9.  RE: Large XML handling - Issue

    Posted 05/13/12 11:30 AM


  • 10.  RE: Large XML handling - Issue

    Posted 05/14/12 02:10 PM

    I have previously implemented large file XML processing using open source STAX API in a java service (receiver service) .

    [URL]JDK 19 Documentation - Home

    I did not have a chance to look at ehcache but may be you could use it too for large file processing.

    Cheers,
    Akshith


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 11.  RE: Large XML handling - Issue

    Posted 05/30/12 12:12 PM

    HI Saravanan.E and Akki

    This wmuser thread helps to create an flowservice for large file handling.
    Thanks a lot

    Regards,
    Jeevan


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods