- isn"t Netty based on NIO? Why do you say you are asynchronous event-driven?
Netty
says that he is an asynchronous event-driven framework, but does not say that the network model uses an asynchronous model. The asynchronous event-driven framework shows that all IO O
operations are asynchronous, and all IO
calls return immediately, which does not guarantee the success of the call, but the call will return ChannelFuture
, and netty
will inform you through ChannelFuture
whether the call was successful or failed or cancelled.
io.netty.channel.Channel
class, please refer to.
All I operations are asynchronous. O operations are asynchronous.An important topic of the
All I amp O operations in Netty are asynchronous. It means any calls will O calls will
return immediately with no guarantee that the requested I operation has O operation has
been completed at the end of the call. Instead, you will be returned with
a {@ link ChannelFuture} instance which will notify you when the requested I br O
operation has succeeded, failed, or canceled.
threading framework is the threading communication model, while EDA (Event-Driven Architecture) is a higher-dimensional architecture that implements loosely coupled and scalable components. I wrote a thread-related is there any contradiction between the two? Netty publicity: Netty is an asynchronous event-driven network application framework Netty is first of all a network application framework. How do server and client write data to each other? This is NIO Netty is another asynchronous time-driven framework. Server or client need to deal with it after getting the data. This framework is used
NIO is the underlying: netty uses IO multiplexing such as epoll.
event driven: there is usually a main loop and a task queue. All events are just stuffed into the queue, and the main loop is taken out of the queue and processed. If you do not rely on multiplexing to handle multiple tasks, you will need multithreading (equivalent to the number of connections), but depending on multiplexing, this loop can handle multiple connections in a single thread. No matter which connection or what event occurs, it will be taken out of the queue by the main loop and handled by callback function, etc., that is, the direction of the program is event-driven
as for async, it is said that it is asynchronous for the user to open, but the actual nio is only Synchronize non-blocking.
for rapid development of maintainable high performance protocol servers & clients
Previous: Greasemonkey API display undefined
Next: MybatisPlus Custom Global Operation exists always returns null