Follow the link to find Presentation
Follow the link to find Javeloper Presentation
There are 3 examples using Java Nio library:
- Build project using gradle clean && gradle build
- Run the server using java -cp . app/src/main/java/com/nio/EchoServer.java
- Connect to the server using nc -v 0.0.0.0 5555
- Build project using gradle clean && gradle build
- Run the server using java -cp . app/src/main/java/com/nio/reactor/TcpServer.java
- Connect to the server using nc -v 0.0.0.0 5555
3. Tcp server implementation provided Data Flow Control app/src/main/java/com/nio/TcpDataFlowExample.java
- Build project using gradle clean && gradle build
- Run the server using java -cp . app/src/main/java/com/nio/TcpDataFlowExample.java
- Connect to the data channel nc -v 0.0.0.0 5555
- Connect to the control channel nc -v 0.0.0.0 4444
The idea of the project to show how we can manipulate with TCP Flow Control using Java Nio. There data and control channels. The data channel receive inbound data and convert it to UPPERCASE (just for fun). The control channel has 2 commands stop-read and start-read data to manipulate with data in the data channel. When we send stop-read command to the control channel the data channel will stop receive inbound data. In such case we can get TCP Window Size to 0. To start read data again we need to send start-read command and after that all data are contained to the queue will be received by the data channel.
To send huge amount of data you can generate it here https://json-generator.com
- ITT 2015 - Heinz Kabutz - The Multi-threading, Non Blocking IO
- Java NIO Tutorial
- Scalable IO in Java
- Queueing in the Linux Network Stack
- Multi-queue improvements in Linux kernel Ethernet driver mvneta
- TCP/IP Illustrated, Volume 1: The Protocols, 2nd Edition
- Java NIO - Reactor
- SSL Introduction with Sample Transaction and Packet Exchange
- Java SSLEngine
- Performance and scalability analysis of Java IO and NIO based server models, their implementation and comparison