Question for people who are building applications:


Is there any real need to cache proxied data on the server, now that we don't transcode it on the server?

I'm asking because there are some reports of warnings from the HTTPClient library which appear to be caused
by back end servers not setting Content-Length headers, which causes HTTPClient to issue a warning
because since it doesn't know the size of the data, asking for the data as a string or array could potentially use
up all your RAM if the data is huge. It suggests reading the data as an input stream so it doesn't have to be
stored in memory. We can do a stream copy of the data out to the HTTP connection without having to save it in
RAM or on disk.

Now that we are sending XML text to the client, the server really doesn't need to touch it. Well there are two
things we kind of have to do: 1) since we add our own wrapper with HTTP header info, we need to strip
out the <?xml ... ?> declaration from the data if there is any, because you cannot nest that in XML. So we need to have some kind of small buffer to scan for that first. And 2) we also are transcoding into UTF8 if the data is in some other
encoding (as indicated by the HTTP content-type header or by the <? xml encoding=xxxx ?> declaration.  We do that
because Flash's XML parser doesn't seem to have many character sets it understands.

So we do need to some inspection and surgery on the raw data stream from the backend, but we can handle that
with a pushback reader stream sort of thing.

Anyway, is there any good reason to be supporting the data cache at this point? Just curious..







--
Henry Minsky
Software Architect
[EMAIL PROTECTED]

_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev

Reply via email to