tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: tomcat 7 udp connector
Date Mon, 03 Dec 2012 14:36:52 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Pid,

On 12/1/12 8:13 PM, Pid wrote:
> On 01/12/2012 21:15, Jost Boekemeier wrote:
>> Hi,
>> 
>> I don't think tomcat is hard-wired the way you suggest.
> 
> [sigh] Suggest?
> 
> Tomcat, as does the Servlet Spec, focuses on web applications, ie
> ones served over HTTP.
> 
> The Connector implementations are configurable, but there is no
> UDP implementation shipped with Tomcat.  Nor is there a raw
> Servlet, TCP implementation.
> 
> 
>> And the servlet spec doesn't require http.
> 
> What a strange statement.
> 
> The javax.servlet.http package, (being part of the spec), does
> rather seem to focus on it and the 3.0 spec mentions HTTP on a
> fairly large number of it's pages.

To be fair, javax.servlet.Servlet does not require HTTP. Of course,
99% of the uses of a Java Servlet container are to serve HTTP requests.

On the other hand, ServletRequest and ServletResponse (even in their
non-HTTP flavors) are quite obviously set up to handle streaming,
bidirectional connections. Sure, one could use DatagramSocket under
the covers to implement something that looked like a streaming (and
reliable) connection to the client, but since the servlet spec does
not include any APIs for detecting/handling dropped packets, etc. it
really is an odd choice to implement a UDP-based servlet (at least
when using the spec definition of a servlet).

>> In the past I've written a servlet container which uses raw tcp
>> instead of http.

I'd be interested in the architecture of such a beast: using an
unreliable connection for binary and character streams via the servlet
APIs seems untenable. The only way I would think it could work is if
you simply ignored the unreliable nature of UDP and assumed that all
messages would be successfully received and no problems would arise.
In those cases where that's a good bet (for example, all communication
is on localhost or even a local network), the cost of using TCP seems
so small as to be not worth the development effort to support UDP.

>> Probably the tomcat dev ml is more appropriate.

The Tomcat devs are all active on this list. There is no need to post
over there quite yet.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iEYEARECAAYFAlC8uQQACgkQ9CaO5/Lv0PC0rQCgqV7e2gptSn1Yo0gt9P9HSksr
bWUAnjqchRd1nQfb4CTTe01ON1xemaR4
=Maly
-----END PGP SIGNATURE-----

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


Mime
View raw message