[Design of Messaging on JBoss (Messaging/JBoss)] - Inefficiencies in JBM 2 remoting layer
by timfox
I've been looking through our current JBM 2.0 remoting layer - which uses MINA to get a good picture of how things hang together, and it strikes me there are some serious inefficiencies / redundancy in the current implementation.
We are using DemuxingProtocolEncoder/Decoder - and MessageEncoder/Decoder instances - this is redundant - we should just be using ProtocolEncoder and CumulutaveProtocolDecoder directly.
The DemuxingProtocolDecoder will cause decodable to be invoked on *gulp* every codec for every packet. The current decodable() implementation is very slow since it parses the packet, including parsing strings which involves allocation of new strings too, just to find out if the packet is decodable.
I suspect this is why we were seeing very low performance although we know MINA can give great performance.
All this is unnecessary if we just use one codec and a switch statement to identify the packet type, and just use CumulativeProtocolDecoder directly. It will also simplify the code quite a bit.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4143626#4143626
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4143626
17 years, 12 months
[Design of POJO Server] - Re: LogConfigurationException from commons-logging
by bstansberry@jboss.com
Hmm, thought I'd replied before, but don't see the reply.
Anyway, pretty sure you were on the right track. Log from last night's run showed a similar problem, but root cause was an ISE from BaseClassLoader when trying to use it after it had been undeployed -- i.e. a CL leak to a JGroups thread pool thread.
I think this started intermittently popping up when I set "loopback=true" on the channel configs to correct the FLUSH issues you were seeing. All your fault. ;-) With loopback enabled, app threads with the app's TCCL not only push messages down the stack, they also handle carrying the message back up and passing it off to the multiplexer thread pool. If the pool allocates a new thread to handle that message, the app's TCCL leaks to the pool.
I replaced the mulitplexer with the shared transport this evening; I think that should take care of this. Posted on jgroups-dev to check for other similar scenarios:
http://www.nabble.com/Classloader-leaks-in-thread-pools-to16642502.html
I'm working to get it so the standard JEE distributed caches are lazy initialized. That means some user deployment's TCCL is going to be in effect when cache and associated channel are created. Your post makes me realize I need to be sure to set the TCCL to the default domain loader before creating any cache or channel.
Thanks. :)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4143613#4143613
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4143613
17 years, 12 months