jjenkov/java-nio-server
소개
전 과정에서 논블로킹 I/O를 사용하는 Java NIO 서버입니다.
기타 프로젝트측정된 스타 증가
- in 24h
- 0
- in 7 days
- -1
- in 15 days
- -1
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalJava NIO Server
A Java NIO Server using non-blocking IO all the way through.
Note: This is NOT intended for reuse "as is". This is an example of how you could design a Java NIO server yourself. The design is explained in this tutorial:
Because this is an example app - this project will NOT accept feature requests. If there are any obvious bugs in the code, I can fix those, but apart from that, the code has to stay as it is.
Bugs and Improvements:
This server implementation has bugs - and room for improvement.
For instance, memory is never returned to the memory buffer from which they are borrowed (allocated). You can add that yourself, easily.
Also, the memory buffer's design could be improved to just use a single, contiguous memory array. I have that working elsewhere, but just not implemented here.
Virtual Threads
After the introduction of virtual threads in Java, a server design using single-threaded non-blocking IO is not nearly as attractive anymore. It might still have it uses in router-type servers, where messages come in on one connection, and has to be sent out again on another. But traditional servers where the response is sent back to the same connection as the request came from, are probably easier to implement using virtual threads.
관련 프로젝트 살펴보기
불러오는 중…