Dynamically adding producers/consumers

333 views
Skip to first unread message

wasabikun

unread,
Feb 1, 2012, 6:09:38 AM2/1/12
to Disruptor-net
Hello,

Does current evolution plans for the disruptor pattern (whether on
Java or C#) include the ability to dynamically add and remove
producers/consumers? How would you change the design to accommodate
for that?

Would a design based on private buffers (taken from a large array used
as a pool) for each producer/consumer end up degrading overall
performance too much, and look like yet another actor-based scheduler?

Thanks,
Vanni


Olivier

unread,
Feb 1, 2012, 6:25:42 AM2/1/12
to Disruptor-net
Hi Vanni,

Have a look to this thread:

http://groups.google.com/group/lmax-disruptor/browse_thread/thread/3de453858ba184f0/e4fc955a030da5ab?lnk=gst&q=add+remove+consumer#e4fc955a030da5ab

The .NET version should supports the behavior described by Martin.

Olivier

wasabikun

unread,
Feb 2, 2012, 6:30:55 AM2/2/12
to Disruptor-net
Hi Oliver,

By my (still very limited) understanding of the codebase, adding new
consumers to a SequenceGroup adds more event subscribers to the graph.
Would it be possible to dynamically change the graph topology by
adding both producers and consumers?

Thanks,
V.

On Feb 1, 11:25 am, Olivier <m...@odeheurles.com> wrote:
> Hi Vanni,
>
> Have a look to this thread:
>
> http://groups.google.com/group/lmax-disruptor/browse_thread/thread/3d...
>
> The .NET version should supports the behavior described by Martin.
>
> Olivier
>
> On Feb 1, 11:09 am, wasabikun <vanni.tore...@gmail.com> wrote:
>
>
>
> > Hello,
>
> > Does current evolution plans for the disruptor pattern (whether on
> > Java or C#) include the ability to dynamically add and remove
> > producers/consumers? How would you change the design to accommodate
> > for that?
>
> > Would a design based on private buffers (taken from a large array used
> > as a pool) for each producer/consumer end up degrading overall
> > performance too much, and look like yet another actor-based scheduler?
>
> > Thanks,
> > Vanni- Hide quoted text -
>
> - Show quoted text -

Olivier

unread,
Feb 3, 2012, 4:29:41 AM2/3/12
to disrup...@googlegroups.com
You can add consumers with the solution developed by Martin.

For producers you just need to specify a multi threaded strategy and you can use as many publisher threads as you want, and add/remove publisher threads while the disruptor is started.

Olivier

wasabikun

unread,
Feb 3, 2012, 11:21:12 AM2/3/12
to Disruptor-net
That's great Oliver, thanks.

V.

On Feb 3, 9:29 am, Olivier <m...@odeheurles.com> wrote:
> You can add consumers with the solution developed by Martin.
>
> For producers you just need to specify a multi threaded strategy and you can use as many publisher threads as you want, and add/remove publisher threads while the disruptor is started.
>
> Olivier
>
> >> - Show quoted text -- Hide quoted text -
Reply all
Reply to author
Forward
0 new messages