Is Netty the right choice for my project?

Kevin Stembridge kevin.stembridge at gmail.com
Mon Mar 8 14:09:39 EST 2010


Thanks very much for the advice.  It was very helpful.

Cheers,
Kevin



On 8 March 2010 08:31, "Trustin Lee (이희승)" <trustin at gmail.com> wrote:

> Hi Kevin,
>
> Since nobody's stepping up, let me comment.
>
> stemkev wrote:
> > Hi all,
> >
> > I'm starting a new project and I'm trying to make a decision about how my
> > Java Swing client applications will communicate with my server.
> >
> > In the past I've used a polling mechanism over HTTP, where the server
> would
> > queue up events for client sessions and the clients would poll
> continuously
> > for those events. This approach worked fine but I always thought it was a
> > bit excessive having every client making endless requests. With the new
> > project, there will be far fewer updates being sent to clients so if I
> use
> > the same approach most of the polling will be wasted effort. But I would
> > still like updates to appear in a timely fashion. So I started looking at
> > Netty to see if I could use it to implement a push-based solution.
> >
> > I've only ever used the polling over HTTP approach before so I feel like
> I'm
> > stepping outside my comfort zone a bit and I have a few questions on some
> > technical issues that I know how to solve in the HTTP world but not in
> the
> > Netty world:
> >
> > * How do I perform user authentication (by username/password)?
> > In the HTTP world I would pass an authentication token serialized in each
> > request. I'm guessing I could do the same thing with Netty.
>
> Netty is basically a framework and you can do almost everything you can
> do with a plain socket.
>
> You can implement an authentication mechanism you prefer because
> authentication in HTTP is often inserting some values into an HTTP
> message as a header and you can do that.  However, Netty itself doesn't
> provide an implementation of HTTP auth mechanism such as 'digest'.
>
> If you are talking about non-HTTP custom socket protocol, then you will
> have to design your protocol and keep authentication in mind.
>
> > * How do I do load balancing if I have multiple server-side modules?
>
> There are many ways to load-balance multiple server instances, but Netty
> is not a load balancer but a generic framework that enables you to write
> a network application.  You will have to use other load-balancing
> technology or implement it by yourself (using Netty or using something
> else).
>
> > * What should I do if clients are running behind a firewall?
> > I have seen a Jira issue regarding HTTP tunnelling
> > (https://jira.jboss.org/jira/browse/NETTY-246). Is this the only
> solution?
> > If tunnelling over HTTP, does this mean I need a servlet container on the
> > server?
>
> I'd prefer to use HTTP as a primary protocol rather than using HTTP
> tunneling if your concern is not performance.
>
> HTH,
> Trustin
>
> >
> >
> > Any advice would be great.
> >
> > Kevin
> >
> >
>
> --
> what we call human nature in actuality is human habit
> http://gleamynode.net/
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/netty-users/attachments/20100308/a8b2cf13/attachment-0001.html 


More information about the netty-users mailing list