A question about your HttpClient example and beyond

J. Mi jmi258 at gmail.com
Wed Sep 2 15:11:13 EDT 2009


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/20090902/2c8badba/attachment.html 


More information about the netty-dev mailing list