Book Image

WildFly Performance Tuning

Book Image

WildFly Performance Tuning

Overview of this book

Table of Contents (17 chapters)
WildFly Performance Tuning
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Using XNIO


Undertow has been designed to make full use of the ultra-high-performance XNIO framework.

XNIO, in turn, builds on the Java NIO API. XNIO provides full NIO support and enhances it by providing an enriched and simplified API with a partially higher abstraction layer. XNIO also offers other related functionalities, such as callbacks, multicast, and socket support (both blocking and non-blocking).

NIO basics

The Java NIO API itself was introduced with J2SE 1.4, enhancing the overall standard I/O performance and including support for native memory.

The following are the main components of NIO:

  • Channel

  • Buffer

  • Selectors

A NIO channel is a component that a client can use to write data to or read data from. The standard channels currently support both file and network (both UDP and TCP) access. They can be asynchronous and they write incoming data to or read outgoing data from NIO buffers.

The NIO buffers are used to store data and are based on the datatype of what they can store. The java.nio...