aspose file tools*
The moose likes Web Services and the fly likes Maximum XML paylod size Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Maximum XML paylod size" Watch "Maximum XML paylod size" New topic
Author

Maximum XML paylod size

Pallav Bora
Ranch Hand

Joined: Oct 13, 2009
Posts: 73
Hi,

My question is not specific to web services.

I need to send a file in XML format in either over normal internet or through FTP.

I would like to know the following:

# First , what is the optimal size of an XML file so that the file can be processed efficiently. We can assume that server memory is not a constraing as memory willbe upgraded if needed.

# If my XML file size is 24 MB what should be the minimum server configuration to be able to parse and process this message?

Thanks

Pallav
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12786
    
    5
I can't imagine what an "optimum size of an XML file" is since there are so many possible uses for XML.

That said, there are optimizations which may be applicable, depending on the circumstances.

If bandwidth is a problem you might look into "fast infoset" encoding and zip compression. Zip compression can easily cut transmission size by a factor of ten due to the highly repetitive nature of XML tags. If you have control over creation of the XML, using short tag names and eliminating namespaces will save bandwidth and parsing time.

It is also likely that using SAX style parsing will be much faster and use less memory then DOM style processing. Probably writing the code will be a bit harder but the saving is HUGE.

Bill


Pallav Bora
Ranch Hand

Joined: Oct 13, 2009
Posts: 73
Thanks a lot Bill, I greatly appreciate your input !

On a different note,

I thought XML pull prsers are the fasest as of today. However in an issue of ACM (Association for Computing Machinery) journal I read about an upcoming XML parser which will be even faster. However unfortunately I don't remember the name of the parser. Do you have any idea about this?

Thanks

Pallav

William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12786
    
    5
I have not seen anything new in parser speed for several years. Back when XML parsers in Java were just getting started, there was a lot of competition but it seems to have settled down.

You might check in to Fastinfoset parsers ( also written as Fast Infoset ) - when I last looked into Fast Infoset in 2006 it was distinctly faster than the standard library.

Current Glassfish Fast Infoset project.

Of course, to use Fast Infoset you must control the XML creation side.

Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Maximum XML paylod size