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
3
u/bytedonor Jan 16 '23 edited Jan 16 '23
Why not just use ‘ServerSocket’, accept connections on main and pass the open socket to a VT executor task? I did something like this recently and was able to pump data across 500K web sockets in my test