A question about your HttpClient example and beyond

J. Mi jmi258 at gmail.com
Thu Sep 3 19:53:56 EDT 2009


Hi all,

I guess my fundamental question here is if, in theory at least, Netty
provides a better asynchronous mechanism than the concurrent java package
from java.util.concurrent.* in terms of performance. Does internally Netty
use multi-threading, java.nio, or both, or neither?

If Netty does better than java.util.concurrent.* for performance, is there
any example, tutorial, which can guide me a little for replacing my current
multi-threading process which I described in that previous email?

Many thanks to you for sharing your expertise,
Jason

On Wed, Sep 2, 2009 at 12:11 PM, J. Mi <jmi258 at gmail.com> wrote:

> Hi folks,
>
> Currently, my application's process flow logic is like this:
>
> -> A controlling process receives one request for data which will be
> fetched from multiple online sources.
> -> The controlling process spawns multiple threads. Each of these threads
> will (1) use Apache synchronous commons httpclient to fetch the data; (2)
> parse the data; and (3)
>     return the data to the controlling process.
> -> The controlling process joins all threads and return the combined data
> to the requestor.
>
> So basically, each thread uses a synchronous httpclient to fetch the data
> and then parse it.
>
>  In reading org.jboss.netty.example.http.snoop package, I have the
> following question:
> If I just replace the Apache's synchronous httpclient with Nettty's
> org.jboss.netty.handler.codec.http.* as the example does, will I be
> benefited performance-wise? I heard something about blocking I/O hurts
> multi-threading. If so, should Netty's package work better for me?
>
> Or should I actually get ride of the existing multi-threading by using
> Netty's framework? If so, which of your examples can be better referenced
> for my purpose?
>
> Thanks for your in advance,
> Jason
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/netty-dev/attachments/20090903/d3efa884/attachment.html 


More information about the netty-dev mailing list