而今,微服務(wù)架構(gòu)是一個(gè)繞不開(kāi)的話(huà)題。一款優(yōu)秀的網(wǎng)絡(luò)通信框架更是在微服務(wù)架構(gòu)中起到了舉足輕重的作用,JBOSS Netty就是其中最璀璨的明珠,Let's Approach Netty. https://netty.io/
Netty Architecture
What is Netty?
Netty is an asynchronous event-driven network application framework for rapid development of maintainable high performance protocol servers & clients.
Netty是一款異步事件驅(qū)動(dòng)的網(wǎng)絡(luò)應(yīng)用框架。用于快速開(kāi)發(fā)可維護(hù)的高性能協(xié)議服務(wù)器和客戶(hù)端。
Introduction
Netty is a NIO client server framework which enables quick and easy development of network applications such as protocol servers and clients. It greatly simplifies and streamlines network programming such as TCP and UDP socket server.
'Quick and easy' doesn't mean that a resulting application will suffer from a maintainability or a performance issue. Netty has been designed carefully with the experiences earned from the implementation of a lot of protocols such as FTP, SMTP, HTTP, and various binary and text-based legacy protocols. As a result, Netty has succeeded to find a way to achieve ease of development, performance, stability, and flexibility without a compromise.
Netty是一款NIO客戶(hù)端服務(wù)器框架,它可以快速、方便地開(kāi)發(fā)網(wǎng)絡(luò)應(yīng)用,如協(xié)議服務(wù)器和客戶(hù)端。它極大地簡(jiǎn)化和精簡(jiǎn)了網(wǎng)絡(luò)編程,諸如TCP和UDP套接字服務(wù)器。
‘快速和簡(jiǎn)單‘并不意味著所產(chǎn)生的應(yīng)用程序?qū)⑹艿娇删S護(hù)性或性能問(wèn)題的影響。Netty經(jīng)過(guò)精心設(shè)計(jì),吸取了許多協(xié)議的經(jīng)驗(yàn),如FTP、SMTP、HTTP以及各種二進(jìn)制和基于文本的傳統(tǒng)協(xié)議。因此,Netty成功地找到了一種無(wú)需讓步即可輕松實(shí)現(xiàn)開(kāi)發(fā)、性能、穩(wěn)定性和靈活性的方法。
Note:NIO——Non-Blocking IO的縮寫(xiě),非阻塞輸入/輸出 (NIO) 庫(kù)是在 JDK 1.4 中引入的NIO 彌補(bǔ)了原來(lái)的 I/O 的不足,它在標(biāo)準(zhǔn) JAVA 代碼中提供了高速的 I/O。






