preface

After 15 years, Netty is now the hottest framework for Java network programming and our must-learn framework for developing high-performance Java servers. It not only contains a wealth of network knowledge, but also contains a lot of high-level Java programming skills, so it is a classic case of our learning Java, learning network programming rare.

Writing a simple web application in Netty is easy, but learning the ins and outs of Netty and how it works is a lengthy process that requires both advanced Java programming knowledge and network knowledge. At the same time, Netty contains various algorithms and optimization strategies, which is also one of the difficulties in Netty learning.

By the end of this Netty Field Note, you will be able to use Netty for project development, optimization and troubleshooting, and will be able to contribute to the Netty project itself.

Without more words, the following take you to appreciate the charm of this actual combat note, need this note of concern public number future have light free.

Chapter 1: Netty asynchrony and event-driven

  • Java Network Programming
  • Introduction of Netty
  • The core components of Netty

Chapter 2: Setting up your Netty application

  • Setting up the Development Environment
  • Write the Echo server and client
  • Build and test the application

Chapter 3 components and design of Netty

  • Technical and architectural aspects of Netty
  • Channel, EventLoop, and ChannelFuture
  • ChannelHandler and ChannelPipeline
  • guide

Chapter 4 Transmission

  • OIO — blocks the transmission
  • NIO — Asynchronous transmission
  • Local — Asynchronous communication within the JVM
  • Embedded — Test your ChannelHandler

Chapter 5 ByteBuf

  • ByteBuf — Netty’s data container
  • Details of the API
  • Use cases
  • Memory allocation

Chapter 6 ChannelHandler and channel ii pipeline

  • ChannelHandler API and ChannelPipeline API
  • Detecting resource leaks
  • Exception handling

Chapter 7 EventLoop and the threading model

  • Overview of the Threading model
  • The concept and implementation of event loops
  • Task scheduling
  • Implementation details

Chapter 8 Guidance

  • Boot the client and server
  • Bootstrap the client from within a Channel
  • Add ChannelHandler
  • Use ChannelOption and attribute 1

Chapter 9 Field test

  • Unit testing
  • EmbeddedChannel overview
  • Test the ChannelHandler using EmbeddedChannel

Chapter 10 codec framework

  • Overview of decoders, encoders, and codecs
  • Netty’s codec class

Chapter 11 preconfigured ChannelHandler and codecs

  • Secure Netty applications using SSL/TLS
  • Build HTTP/HTTPS applications based on Netty
  • Handles idle connections and timeouts
  • Decodes separator – based and length – based protocols
  • Writing large data

conclusion

This note ends there, but wants to say something again! In fact, Netty is really not a difficult technical point in the technology stack, as long as you are willing to attentively, spend some time is very simple to master!

Finally, we hope that the same is knocking code, in the new 2021 everyone suddenly rich, annual salary million!

【Netty Combat Notes 】 【Netty Combat Notes 】

— Forward + like + comment article, pay attention to the public account you can get free of charge.