Hi , I have added the support for configure worker pool in Disruptor and run EventHandlers through it. you can configure "disruptor.consumer.worker.pool.size" property as parameter in netty-transports.yml under TransportListener configurations.
thanks On Thu, Feb 25, 2016 at 9:19 AM, Isuru Ranawaka <[email protected]> wrote: > Hi Azeez, > > We will support that . > > thanks > > > On Wed, Feb 24, 2016 at 12:35 PM, Afkham Azeez <[email protected]> wrote: > >> In MSS, when a call reaches an operation, we may in turn call another >> microservice or do a DB call, for example. Those scenarios need to be >> supported. >> >> On Wed, Feb 24, 2016 at 10:49 AM, Isuru Ranawaka <[email protected]> wrote: >> >>> Hi Samiyuru, >>> >>> Do you need to do blocking operations inside EventHandler threads ? If >>> so we can add that functionality in future release >>> >>> thanks >>> >>> On Wed, Feb 24, 2016 at 10:35 AM, Samiyuru Senarathne <[email protected] >>> > wrote: >>> >>>> 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] >>>> >>> >>> >>> >>> -- >>> Best Regards >>> Isuru Ranawaka >>> M: +94714629880 >>> Blog : http://isurur.blogspot.com/ >>> >> >> >> >> -- >> *Afkham Azeez* >> Director of Architecture; WSO2, Inc.; http://wso2.com >> Member; Apache Software Foundation; http://www.apache.org/ >> * <http://www.apache.org/>* >> *email: **[email protected]* <[email protected]> >> * cell: +94 77 3320919 <%2B94%2077%203320919>blog: * >> *http://blog.afkham.org* <http://blog.afkham.org> >> *twitter: **http://twitter.com/afkham_azeez* >> <http://twitter.com/afkham_azeez> >> *linked-in: **http://lk.linkedin.com/in/afkhamazeez >> <http://lk.linkedin.com/in/afkhamazeez>* >> >> *Lean . Enterprise . Middleware* >> > > > > -- > Best Regards > Isuru Ranawaka > M: +94714629880 > Blog : http://isurur.blogspot.com/ > -- Best Regards Isuru Ranawaka M: +94714629880 Blog : http://isurur.blogspot.com/
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
