real-time

PostgreSQL LISTEN/NOTIFY for pub-sub messaging

LISTEN/NOTIFY provides real-time pub-sub messaging. Publishers send notifications via NOTIFY. Subscribers receive notifications via LISTEN. I use it for cache invalidation, real-time updates, inter-process communication. Payloads up to 8000 bytes carr

WebSocket for real-time communication

WebSocket enables full-duplex communication between client and server. Spring WebSocket supports STOMP protocol over WebSocket. I configure message brokers for pub-sub messaging. @MessageMapping handles incoming messages. SimpMessagingTemplate sends m

WebSockets for real-time bidirectional communication

WebSockets enable real-time, full-duplex communication between client and server. I create WebSocket connections with new WebSocket(url) for persistent connections. The protocol uses ws:// or wss:// (secure) URLs. Events like onopen, onmessage, onerro