Stream corruption with multiple producers -> SOLVED

Shay Banon kimchy at gmail.com
Mon Dec 28 14:37:31 EST 2009


I think that the all concept of the documentation annotation and the fact
that you can actually change the pipeline on the bootstrap without a
pipeline factory is confusing.

I understand (the very rare, I think) case where you would want to have a
pipeline that is shared by all channels, but I think that currently its not
very simple to understand that... .

For example, something that might be simpler is removing (deprecating) the
pipeline on the bootstrap completely (you must provide a pipeline factory),
and maybe have an annotation or a SharedPipelineFactory interface that you
can implement to have a pipeline shared across channels.

The above is not the best solution, I need to think about it a bit more. Any
solution should be something where the API documents itself, without needing
to read the docs... .

Shay

On Mon, Dec 28, 2009 at 3:39 PM, Luis Neves <luis.neves at gmail.com> wrote:

> On Mon, Dec 28, 2009 at 12:00 PM, "Trustin Lee (이희승)" <trustin at gmail.com>
> wrote:
> > Hi Luis and Shay,
> >
> > Did you find the current documentation confusing about setting up the
> > pipeline?
>
>
> Not really... In my eagerness to quickly have something working I've
> only glanced trough the documentation... I've read the paragraph:
>
> "However, as your application gets more and more complex, you will
> almost always end up with writing a ChannelPipelineFactory, which
> yields much more flexibility to the pipeline configuration."
>
> And I thought "more flexible but basically the same"... of course I've
> failed to read the above paragraphs:
>
> "It might look somewhat complicated at the first glance, and it is
> true that we don't need to introduce TimeClientPipelineFactory  in
> this particular case because TimeClient creates only one connection"
>
> and
>
> "There's another place that needs a fix. Do you remember that we added
> a TimeClientHandler instance to the default ChannelPipeline of the
> ClientBootstrap? It means one same TimeClientHandler instance is going
> to handle multiple Channels and consequently the data will be
> corrupted. To create a new TimeClientHandler  instance per Channel, we
> have to implement a ChannelPipelineFactory"
>
>
> So I guess the only problem of the documentation is that it isn't idiot
> proof.
>
> Regards.
>
> --
> Luis Neves
>
> _______________________________________________
> 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/20091228/775e5f3e/attachment.html 


More information about the netty-users mailing list