Question about whare to put bussines logic
Srini Palthepu
Srinivas.Palthepu at cmegroup.com
Mon Apr 12 12:16:06 EDT 2010
Hi
I am in the process of re-factoring an existing Java server that uses old IO
to Netty framework. I have gone through the examples and have basic
understanding of the event based architecture. As I understand, the most/all
of the logic of application essentially goes into the hanlders such as
messageRecieved() after doing all the protocol decoding using
encoder/decoder. My question is what if the processing takes more time to
accomplish? Does it not block the thread in the handler's messageRecieved()?
I see all the examples are designed in a way where reading and processing
and writing back are all are done in the same routine in one thread. I am
assuming that if processing takes lot of time, then I need to place the data
rec'd and the channel reference into some global map and hand it to other
worker threads in a separate pool. The worker thread when finished the
processing will write the reply to the channel. Am I thinking right or
missing something.
thanks for any help
Srini
--
View this message in context: http://n2.nabble.com/Question-about-whare-to-put-bussines-logic-tp4891077p4891077.html
Sent from the Netty User Group mailing list archive at Nabble.com.
More information about the netty-users
mailing list