4 pages tagged across the site.
A single catch-all exception forces every call site to over-handle. Two types in a hierarchy let each caller pick its own granularity.
A WebSocket connection that needs periodic pings to stay open shouldn’t run that ping loop on a plain, non-daemon thread. In the WazirX Java connector , the ping thread is started onOpen and marked setDaemon(true) before starting it: pingThread = new Thread(new PingMessage(this)); pingThread.setDaemon(true); pingThread.start(); A non-daemon thread keeps the JVM alive until it finishes. If a caller opens a socket, forgets to close it, and the rest of the application shuts down, a non-daemon ping thread will keep the process running indefinitely. A daemon thread just gets killed when everything else is done — which is the right default for background keepalive work that isn’t itself the point of the program.
An open-source unofficial REST/WebSocket client for the WazirX crypto exchange in Java, acknowledged by WazirX's co-founder.
Five-plus years on a real-money real-time poker platform: game logic, load testing at 10k+ concurrent users, disaster recovery, and a PHP → Node.js migration.