Thanks very much for the advice.  It was very helpful.<br><br>Cheers,<br>Kevin<br><br><br><br><div class="gmail_quote">On 8 March 2010 08:31, &quot;Trustin Lee (이희승)&quot; <span dir="ltr">&lt;<a href="mailto:trustin@gmail.com">trustin@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Kevin,<br>
<br>
Since nobody&#39;s stepping up, let me comment.<br>
<br>
stemkev wrote:<br>
&gt; Hi all,<br>
&gt;<br>
&gt; I&#39;m starting a new project and I&#39;m trying to make a decision about how my<br>
&gt; Java Swing client applications will communicate with my server.<br>
&gt;<br>
&gt; In the past I&#39;ve used a polling mechanism over HTTP, where the server would<br>
&gt; queue up events for client sessions and the clients would poll continuously<br>
&gt; for those events. This approach worked fine but I always thought it was a<br>
&gt; bit excessive having every client making endless requests. With the new<br>
&gt; project, there will be far fewer updates being sent to clients so if I use<br>
&gt; the same approach most of the polling will be wasted effort. But I would<br>
&gt; still like updates to appear in a timely fashion. So I started looking at<br>
&gt; Netty to see if I could use it to implement a push-based solution.<br>
&gt;<br>
&gt; I&#39;ve only ever used the polling over HTTP approach before so I feel like I&#39;m<br>
&gt; stepping outside my comfort zone a bit and I have a few questions on some<br>
&gt; technical issues that I know how to solve in the HTTP world but not in the<br>
&gt; Netty world:<br>
&gt;<br>
&gt; * How do I perform user authentication (by username/password)?<br>
&gt; In the HTTP world I would pass an authentication token serialized in each<br>
&gt; request. I&#39;m guessing I could do the same thing with Netty.<br>
<br>
Netty is basically a framework and you can do almost everything you can<br>
do with a plain socket.<br>
<br>
You can implement an authentication mechanism you prefer because<br>
authentication in HTTP is often inserting some values into an HTTP<br>
message as a header and you can do that.  However, Netty itself doesn&#39;t<br>
provide an implementation of HTTP auth mechanism such as &#39;digest&#39;.<br>
<br>
If you are talking about non-HTTP custom socket protocol, then you will<br>
have to design your protocol and keep authentication in mind.<br>
<br>
&gt; * How do I do load balancing if I have multiple server-side modules?<br>
<br>
There are many ways to load-balance multiple server instances, but Netty<br>
is not a load balancer but a generic framework that enables you to write<br>
a network application.  You will have to use other load-balancing<br>
technology or implement it by yourself (using Netty or using something<br>
else).<br>
<br>
&gt; * What should I do if clients are running behind a firewall?<br>
&gt; I have seen a Jira issue regarding HTTP tunnelling<br>
&gt; (<a href="https://jira.jboss.org/jira/browse/NETTY-246" target="_blank">https://jira.jboss.org/jira/browse/NETTY-246</a>). Is this the only solution?<br>
&gt; If tunnelling over HTTP, does this mean I need a servlet container on the<br>
&gt; server?<br>
<br>
I&#39;d prefer to use HTTP as a primary protocol rather than using HTTP<br>
tunneling if your concern is not performance.<br>
<br>
HTH,<br>
Trustin<br>
<br>
&gt;<br>
&gt;<br>
&gt; Any advice would be great.<br>
&gt;<br>
&gt; Kevin<br>
&gt;<br>
&gt;<br>
<font color="#888888"><br>
--<br>
what we call human nature in actuality is human habit<br>
<a href="http://gleamynode.net/" target="_blank">http://gleamynode.net/</a><br>
<br>
<br>
</font></blockquote></div><br>