This topic has not yet been written. The content below is from the topic description.
2.4.1. Codec framework As demonstrated in Section 1.8, “ Speaking in POJO instead of ChannelBuffer ”, it is always a good idea to separate a protocol codec from a business logic. However, there are some complications when implementing this idea from scratch. You have to deal with the fragmentation of messages. Some protocols are multi-layered (i.e. built on top of other lower level protocol). Some are too complicated to be implemented in a single state machine. Consequently, a good network application framework should provide an extensible, reusable, unit-testable, and multi-layered codec framework that generates maintainable user codec. Netty provides a number of basic and advanced codecs built on top of its core to address most issues you will encounter when you write a protocol codec regardless if it is simple or not, binary or text - simply whatever.