NetTalk Central

Author Topic: XML server / page size  (Read 5767 times)

Rhys Daniell

  • Newbie
  • *
  • Posts: 34
    • View Profile
XML server / page size
« on: April 06, 2009, 01:49:34 PM »
Hi All,

I'm trying to build an XML/client server which passes a request to the server and gets back a wad of data for internal consumption.

The Nettalk limit on page size (16kb) for the NetWebclient is a bit onerous in this age of increasingly plentiful bandwidth. Is there a way of increasing it?

I'd prefer not to retrieve data in smaller chunks and then assemble them as this considerably increases the degree of difficulty.

An attractive alternative would be to use the NetSimple class which can handle multiple packets,  but this does not have proxy support which is required in this case. Does anybody know how proxy support could be enabled?


TIA
Rhys

bshields

  • Sr. Member
  • ****
  • Posts: 392
    • View Profile
    • Inhabit
    • Email
Re: XML server / page size
« Reply #1 on: April 07, 2009, 01:25:40 AM »
Hi Rhys,

Nettalk does have a 16kb buffer under certain circumstances. But its actually quite hard to bump into it.

If your XML is on disk use p_web._SendFile() and you'll have no limits.

If you are constructing the xml as you go along add chunks to the packet variable then issue do SendPacket and keep going.

You've also got p_web._SendBLOB and p_web._SendMemory with no limits.

I do exactly what you are referring to without issues.

Regards
Bill Shields

Rhys Daniell

  • Newbie
  • *
  • Posts: 34
    • View Profile
Re: XML server / page size
« Reply #2 on: April 07, 2009, 11:47:12 AM »
Thanks Bill,

I was basing the server app on an example which used Max:NetBinData as the size of the packet string and I assumed this was a hard coded limit. Sean has pointed out that this is not so, the limit is more like 2Gb (max app memory allocated by the OS).

Knowing you, you've probably developed your own XML file driver. C'mon, hand it over :-)

Cheers
Rhys

bshields

  • Sr. Member
  • ****
  • Posts: 392
    • View Profile
    • Inhabit
    • Email
Re: XML server / page size
« Reply #3 on: April 07, 2009, 04:22:45 PM »
Hi Rhys,

My XML is all over the shop.

In an older system i use Centrepoint XML (the one in clarion without any of the clarion classes, wasn't too impressed by them)

In newer systems i use iqXML.

In my web services i just write XML as text for speed and simplicity reasons.

John Moore has written a nice XML class which is fast and simple. Plus Capesoft have their xFiles which also appears lean.

A word of caution, you can up the MAX:NetBinData size but you will get performance issues, depending upon what you are doing.

I took it up to 640,000 and there was a considerable impact on speed 2-3 times slower. However, my own code contributed to this. Every time you do a CLIP() on a big string it takes time.

Regards
Bill

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: XML server / page size
« Reply #4 on: April 11, 2009, 01:27:23 AM »
Bill,
Using CSTRING vars saves you using CLIP()
Rene
Rene Simons
NT14.14

bshields

  • Sr. Member
  • ****
  • Posts: 392
    • View Profile
    • Inhabit
    • Email
Re: XML server / page size
« Reply #5 on: April 11, 2009, 04:04:57 PM »
Hi Rene,

Good point! Thanks.

Bill