而今,微服務(wù)架構(gòu)是一個繞不開的話題。一款優(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ū)動的網(wǎng)絡(luò)應(yīng)用框架。用于快速開發(fā)可維護的高性能協(xié)議服務(wù)器和客戶端。
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客戶端服務(wù)器框架,它可以快速、方便地開發(fā)網(wǎng)絡(luò)應(yīng)用,如協(xié)議服務(wù)器和客戶端。它極大地簡化和精簡了網(wǎng)絡(luò)編程,諸如TCP和UDP套接字服務(wù)器。
‘快速和簡單‘并不意味著所產(chǎn)生的應(yīng)用程序?qū)⑹艿娇删S護性或性能問題的影響。Netty經(jīng)過精心設(shè)計,吸取了許多協(xié)議的經(jīng)驗,如FTP、SMTP、HTTP以及各種二進制和基于文本的傳統(tǒng)協(xié)議。因此,Netty成功地找到了一種無需讓步即可輕松實現(xiàn)開發(fā)、性能、穩(wěn)定性和靈活性的方法。
Note:NIO——Non-Blocking IO的縮寫,非阻塞輸入/輸出 (NIO) 庫是在 JDK 1.4 中引入的NIO 彌補了原來的 I/O 的不足,它在標準 JAVA 代碼中提供了高速的 I/O。