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, "Trustin Lee (이희승)" <span dir="ltr"><<a href="mailto:trustin@gmail.com">trustin@gmail.com</a>></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's stepping up, let me comment.<br>
<br>
stemkev wrote:<br>
> Hi all,<br>
><br>
> I'm starting a new project and I'm trying to make a decision about how my<br>
> Java Swing client applications will communicate with my server.<br>
><br>
> In the past I've used a polling mechanism over HTTP, where the server would<br>
> queue up events for client sessions and the clients would poll continuously<br>
> for those events. This approach worked fine but I always thought it was a<br>
> bit excessive having every client making endless requests. With the new<br>
> project, there will be far fewer updates being sent to clients so if I use<br>
> the same approach most of the polling will be wasted effort. But I would<br>
> still like updates to appear in a timely fashion. So I started looking at<br>
> Netty to see if I could use it to implement a push-based solution.<br>
><br>
> I've only ever used the polling over HTTP approach before so I feel like I'm<br>
> stepping outside my comfort zone a bit and I have a few questions on some<br>
> technical issues that I know how to solve in the HTTP world but not in the<br>
> Netty world:<br>
><br>
> * How do I perform user authentication (by username/password)?<br>
> In the HTTP world I would pass an authentication token serialized in each<br>
> request. I'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't<br>
provide an implementation of HTTP auth mechanism such as 'digest'.<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>
> * 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>
> * What should I do if clients are running behind a firewall?<br>
> I have seen a Jira issue regarding HTTP tunnelling<br>
> (<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>
> If tunnelling over HTTP, does this mean I need a servlet container on the<br>
> server?<br>
<br>
I'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>
><br>
><br>
> Any advice would be great.<br>
><br>
> Kevin<br>
><br>
><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>