Hi Isuru,

So what is the a way to have a worker pool [1]?

[1] -
https://lmax-exchange.github.io/disruptor/docs/com/lmax/disruptor/dsl/Disruptor.html#handleEventsWithWorkerPool(com.lmax.disruptor.WorkHandler...)

Best Regards,
Samiyuru


On Tue, Feb 23, 2016 at 10:30 AM, Isuru Ranawaka <[email protected]> wrote:

> Hi samiyuru,
>
> According to the Disruptor architecture it is written such that to
> minimize thread switching .If we define high number of  threads in Executor
> Service  than no of EventHandlers then it will only pick
> threads equal to EventHandlers.If particular  thread blocked then that
> EventHandler also get blocked. So due to this reason we should not do any
> blocking operation inside Disruptor Handlers.So particular EventHandler is
> always bound to particular thread in ExceutorService for EventHandler life
> time.So I think configuring threads on Executor service  may not have
> significant improvement.
>
> thanks
> IsuruR
>
>
> On Tue, Feb 23, 2016 at 10:04 AM, Samiyuru Senarathne <[email protected]>
> wrote:
>
>> Hi Shafreen,
>>
>> Yeah, the threads in this ExecutorService will be used to execute the
>> EventHandler. So, according to the current implementation for one handler
>> there will be only one thread right?
>>
>> In this case, events cannot be processed concurrently. Events will be
>> processed one after another sequentially. Therefore, I think we should have
>> a way to specify the number of event handlers and the number of threads in
>> the  ExecutorService separately.
>>
>> Best Regards,
>> Samiyuru
>>
>> On Tue, Feb 23, 2016 at 9:24 AM, Shafreen Anfar <[email protected]>
>> wrote:
>>
>>> Hi Samiyuru,
>>>
>>> AFAIU, for each Disruptor we create an ExecuterService. Threads in this
>>> ExecutorService will be used to execute the EventHandler of the Disruptor.
>>> Therefore, number of threads in the Executor are the number of
>>> EventHanlders for that particular Disruptor.
>>>
>>> @IsuruR - please correct me if I am wrong :)
>>>
>>> On Fri, Feb 19, 2016 at 10:34 AM, Samiyuru Senarathne <[email protected]
>>> > wrote:
>>>
>>>> Hi,
>>>>
>>>> In carbon-transport, why are the number of event handlers and the
>>>> number of threads in the ExecutorService of Disruptor [1] the same? Is
>>>> there a way to configure them separately?
>>>>
>>>> [1] -
>>>> https://github.com/wso2/carbon-transports/blob/master/http/netty/components/org.wso2.carbon.transport.http.netty/src/main/java/org/wso2/carbon/transport/http/netty/common/disruptor/config/DisruptorFactory.java#L47
>>>>
>>>> Best Regards,
>>>> Samiyuru
>>>>
>>>> --
>>>> Samiyuru Senarathne
>>>> *Software Engineer*
>>>> Mobile : +94 (0) 71 134 6087
>>>> [email protected]
>>>>
>>>
>>>
>>>
>>> --
>>> Regards,
>>> *Shafreen*
>>> Software Engineer
>>> WSO2 Inc
>>> Mobile : 077-556-395-1
>>>
>>
>>
>>
>> --
>> Samiyuru Senarathne
>> *Software Engineer*
>> Mobile : +94 (0) 71 134 6087
>> [email protected]
>>
>
>
>
> --
> Best Regards
> Isuru Ranawaka
> M: +94714629880
> Blog : http://isurur.blogspot.com/
>



-- 
Samiyuru Senarathne
*Software Engineer*
Mobile : +94 (0) 71 134 6087
[email protected]
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to