Volatile fields in the decoders

Frederic Bregier fredbregier at free.fr
Sat Nov 7 12:24:10 EST 2009


Hi Trustin,

For me; I agree that most of the time, Codec are before ExecutionHandler.
In fact, I have no real idea of other cases, except, if I search the extreme case, when one wants to "pipeline" two kinds of channels, for instance:
"network-channel -> one codec -> execution handler -> business handler which writes on local-channel -> another codec -> another execution handler -> another business handler"

I do this to pipeline several "business" stream into one network-channel.
My guess is that probably there the codec for the local channel (the one in the middle named another codec) must be ok for multiple thread suport.
Perhaps not all codec are necessary for that.
Also I'm not completely sure that my example is a good one.. Just a guess more than an example...
WDYT ?

Frederic
  ----- Original Message ----- 
  From: Trustin Lee [via Netty Forums and Mailing Lists] 
  To: Frederic Bregier 
  Sent: Saturday, November 07, 2009 3:47 PM
  Subject: Volatile fields in the decoders


  Hi folks, 

  Currently, all decoders distributed with Netty define their state 
  fields as volatile, because I assumed that the decoders might be 
  placed after ExecutionHandler.  However, nobody seem to place them 
  after ExecutionHandler because decoding is a CPU bound task. 
  Therefore, I'd like to remove the volatile modifier if I did not miss 
  anything.  Please feel free to post your idea - it will be very 
  helpful regardless whether it's agreement or disagreement. 

  Thanks 

  — Trustin Lee, http://gleamynode.net/

  _______________________________________________ 
  netty-dev mailing list 
  [hidden email] 
  https://lists.jboss.org/mailman/listinfo/netty-dev

  — Trustin Lee, http://gleamynode.net/



------------------------------------------------------------------------------

  View message @ http://n2.nabble.com/Volatile-fields-in-the-decoders-tp3964373p3964373.html 
  To start a new topic under Netty Developer Group, email ml-node+685710-1546594857 at n2.nabble.com 
  To unsubscribe from Netty Developer Group, click here. 



-----
Hardware/Software Architect
-- 
View this message in context: http://n2.nabble.com/Volatile-fields-in-the-decoders-tp3964373p3964949.html
Sent from the Netty Developer Group mailing list archive at Nabble.com.



More information about the netty-dev mailing list