Hi Yasara, As part of the restructuring [1] we will be providing a way to create server connectors with separate event loop groups.
[1] "Restructuring CarbonMessageProcessor, CarbonMessage and CarbonCallBack" On Tue, Aug 1, 2017 at 1:34 AM, Yasara Dissanayake <[email protected]> wrote: > Hi Shfreen, > > It is workable without shutting down EventLoop Groups from > ServerConnectorController. But in this scenario AFAIU both MSF4j and Siddhi > uses same ServerConnectorController and it gives following issues when > considering the use case for siddhi. > > > 1. > > Cannot configure event group sizes (boss group size and worker group > size) independently from siddhi side. This is needed us when supporting > orderly process AFAIU. > 2. > > Cannot pause siddi level transport since it will block the thread > group as in [1] . Even if we use a queue to add events, it will block the > thread group when inserting to the queue. In that scenario thread group > will also get blocked for someone else like MSF4j > > > [1]-https://github.com/wso2-extensions/siddhi-io-http/ > blob/master/component/src/main/java/org/wso2/extension/ > siddhi/io/http/source/HttpSourceListener.java#L71-L83 > > > Regards and Thatnks, > > Yasara. > > On Mon, Jul 31, 2017 at 11:20 PM, Shafreen Anfar <[email protected]> > wrote: > >> Hi Yasara, >> >> Why do you want to shutdown the EventLoop groups. AFAIR, it was due to >> some blocking operation in worker (child) thread pool right ? >> >> On Mon, Jul 31, 2017 at 10:49 PM, Yasara Dissanayake <[email protected]> >> wrote: >> >>> Hi all, >>> >>> >>> Currently I’m working on implementing HTTP carbon transport for Siddhi. >>> The problem I face there is that since MSF4J also using HTTP carbon >>> transport we are facing the issue of keeping single bossGroup and workGroup >>> for both MSF4J and Siddhi [1]. Therefore we cannot independently control >>> the configurations of thread groups in Siddhi level and MSF4J level. As >>> the offline discussion had with shafreen and rajith, I’m currently using >>> the the thread groups which created by MSF4J and start >>> ServerconnectorController [2] and cannot stop it at siddhi level since it >>> would give exception [3] as it stops the eventloop groups still used by >>> MSF4J . Further, when we try to pause the HTTP transport in Siddhi >>> level , it will block the HTTP transport in MSF4J and stop the server as >>> well.Any possible resolution for this issue is highly appreciated since >>> this seems to be a blocker when invoking HTTP carbon transport. I have >>> created an issue to track on this[4]. >>> >>> >>> [1] https://github.com/wso2/carbon-transports/blob/master/http/o >>> rg.wso2.carbon.transport.http.netty/src/main/java/org/wso2/ >>> carbon/transport/http/netty/internal/HTTPTransportContextH >>> older.java#L49-L63 >>> >>> [2]https://github.com/wso2-extensions/siddhi-io-http/blob/ma >>> ster/component/src/main/java/org/wso2/extension/siddhi/io/ >>> http/source/HttpConnectorRegistry.java#L130-L134 >>> >>> [3] >>> >>> [2017-07-30 22:47:09,324] ERROR >>> {io.netty.util.concurrent.DefaultPromise.rejectedExecution} >>> - Failed to submit a listener notification task. Event loop shut down? >>> java.util.concurrent.RejectedExecutionException: event executor >>> terminated >>> >>> at io.netty.util.concurrent.SingleThreadEventExecutor.reject(Si >>> ngleThreadEventExecutor.java:821) >>> >>> at io.netty.util.concurrent.SingleThreadEventExecutor.offerTask >>> (SingleThreadEventExecutor.java:327) >>> >>> at io.netty.util.concurrent.SingleThreadEventExecutor.addTask(S >>> ingleThreadEventExecutor.java:320) >>> >>> at io.netty.util.concurrent.SingleThreadEventExecutor.execute(S >>> ingleThreadEventExecutor.java:746) >>> >>> at io.netty.util.concurrent.DefaultPromise.safeExecute(DefaultP >>> romise.java:760) >>> >>> at io.netty.util.concurrent.DefaultPromise.notifyListeners(Defa >>> ultPromise.java:428) >>> >>> at io.netty.util.concurrent.DefaultPromise.setFailure(DefaultPr >>> omise.java:113) >>> >>> at io.netty.channel.DefaultChannelPromise.setFailure(DefaultCha >>> nnelPromise.java:87) >>> >>> at io.netty.channel.AbstractChannelHandlerContext.safeExecute(A >>> bstractChannelHandlerContext.java:1011) >>> >>> at io.netty.channel.AbstractChannelHandlerContext.write(Abstrac >>> tChannelHandlerContext.java:826) >>> >>> at io.netty.channel.AbstractChannelHandlerContext.write(Abstrac >>> tChannelHandlerContext.java:724) >>> >>> at io.netty.channel.AbstractChannelHandlerContext.write(Abstrac >>> tChannelHandlerContext.java:705) >>> >>> at org.wso2.carbon.transport.http.netty.listener.ResponseCallba >>> ck.done(ResponseCallback.java:108) >>> >>> at org.wso2.msf4j.internal.entitywriter.ObjectEntityWriter.writ >>> eData(ObjectEntityWriter.java:57) >>> >>> at org.wso2.msf4j.Response.processEntity(Response.java:292) >>> >>> at org.wso2.msf4j.Response.send(Response.java:285) >>> >>> at org.wso2.msf4j.internal.router.HttpMethodInfo.invoke(HttpMet >>> hodInfo.java:157) >>> >>> at org.wso2.msf4j.internal.MSF4JMessageProcessor.dispatchMethod >>> (MSF4JMessageProcessor.java:208) >>> >>> at org.wso2.msf4j.internal.MSF4JMessageProcessor.lambda$receive >>> $53(MSF4JMessageProcessor.java:120) >>> >>> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPool >>> Executor.java:1142) >>> >>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo >>> lExecutor.java:617) >>> >>> at java.lang.Thread.run(Thread.java:748) >>> >>> [4] https://github.com/wso2/carbon-transports/issues/340 >>> >>> >>> Thanks & Regards, >>> Yasara. >>> -- >>> >>> >>> *Yasara Dissanayake* >>> *Software Engineer* >>> *WSO2 Lanka (pvt) Ltd.* >>> >>> *Web : http://wso2.com/ <http://wso2.com/>* >>> >>> *Email : [email protected] <[email protected]>Mobile : +94702107422 >>> <+94%2070%20210%207422>* >>> <https://lk.linkedin.com/in/dinalidabarera> >>> >> >> >> >> -- >> Regards, >> *Shafreen* >> Software Engineer >> WSO2 Inc >> Mobile : 077-556-395-1 >> > > > > -- > > > *Yasara Dissanayake* > *Software Engineer* > *WSO2 Lanka (pvt) Ltd.* > > *Web : http://wso2.com/ <http://wso2.com/>* > > *Email : [email protected] <[email protected]>Mobile : +94702107422 > <+94%2070%20210%207422>* > <https://lk.linkedin.com/in/dinalidabarera> > -- Regards, *Shafreen* Software Engineer WSO2 Inc Mobile : 077-556-395-1
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
