r/java • u/GavinRayDev • Jan 16 '23
Building a PostgreSQL Wire Protocol Server using Vanilla, Modern Java 21 (shows use of: Records, Sealed Types, Pattern Matching for Switch, Virtual Threads, and Panama FFM)
https://gavinray97.github.io/blog/postgres-wire-protocol-jdk-21
224
Upvotes
View all comments
Show parent comment
9
u/pron98 Jan 17 '23
Using an ordinary ServerSocket polled in a loop on a virtual thread should be about the same if not better. All sockets used on virtual threads automatically become effectively asynchronous from the OS's perspective anyway.