tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Hanik - Dev Lists <devli...@hanik.com>
Subject Re: Comet and multipart
Date Mon, 03 Jan 2011 16:47:55 GMT
On 1/3/2011 7:48 AM, sol myr wrote:
> Hi,
>
> We're implementing a CometServlet on top of Tomcat NIO connector, using "long polling".
> Currently we're using the approach recommended by most tutorials: the client opens a
connection and waits for a message (for a configured timeout); if such a message arrives,
the client consumes it (e.g. presents it on screen), then *closes* the http connection, and
opens a new connection (to wait for the next message).
>
> Unfortunately, we have a network performance problem with opening and closing connections
(our 3rd party proxy is good at keeping connections alive, but is slow in negotiating new
connections).
>
> So we'd like to keep the HTTP connection alive, and pass multiple messages on the same
connection. We were hoping to tell the messages apart based on multipart format, or some other
separator, or content length.
>
> Could anyone please tell whether that's supported on the TomcatServlet side?
yes, it is supported, as long as your client knows how to do it. On the server/servlet side,
all you do is read the input stream byte by byte
you can create any type of protocol rules inside the HTTP message that it sends up
best
Filip

> If so, could you please refer me to the appropriate documentation?
> In particular, is there some flag (on Tomcat or CometServlet) telling it to "support
multipart"?
>
> Thanks :)
>
>
>
>
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 10.0.1191 / Virus Database: 1435/3355 - Release Date: 01/02/11


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message