Rule for multiplicity of channels to remote hosts.
Leandro Cruz
leandro.saad at gmail.com
Fri Apr 16 17:47:11 EDT 2010
I'm not sure if Channel is thread-safe. What I'm doing is. A single thread
that consumes a priority queue and writes to the Channel. I has been working
fine for our needs.
I think this approach minimizes resource allocation since you can't really
write multiple "events" to a channel. Somewhere down the path the messages
will have to be serialized.
--
Leandro Rodrigo Saad Cruz
On Fri, Apr 16, 2010 at 5:11 PM, Will S. <willyjstevens at hotmail.com> wrote:
>
> Hello,
>
> What is best practice when I'd like to send *multiple concurrent* requests
> to the same remote host, via the Channel? Is it safe for multiple threads
> to
> share the same Channel object connected to the same remote host and perform
> concurrent write(Object message)?
>
> I am wondering if the better approach is to control this more on my side by
> queuing requests accordingly, or potentially opening multiple channels (and
> eventually reusing) to write multiple concurrent objects.
>
> Hopefully this is clearly stated; please let me know otherwise.
>
> (I'm a Netty newbie; but I compliment Trustin and his team on the nice work
> (and documentation!) they have assembled.)
>
> Thanks!
> Will
> --
> View this message in context:
> http://n2.nabble.com/Rule-for-multiplicity-of-channels-to-remote-hosts-tp4914969p4914969.html
> Sent from the Netty User Group mailing list archive at Nabble.com.
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/netty-users/attachments/20100416/458b29bb/attachment-0001.html
More information about the netty-users
mailing list