WebSocket communication
A two-way connection between browser and realtime layer.
Realtime communication
I design event communication where a user or system should receive information as soon as it occurs.
Discuss a realtime solution →Polling is not always the answer
With polling, the browser repeatedly asks whether something changed. A realtime model delivers an event only when it actually occurs.
The choice depends on event type, permissions and required reliability.
A two-way connection between browser and realtime layer.
Events are delivered only to relevant topics and subscribers.
For dashboards, notifications, CRM, reservations and background processes.
A custom WebSocket broker can be one implementation. Topic routing, namespaces, authorisation and observability are what matter.
PHP backend
↓ REST publish
Realtime broker
├── Browser
├── Worker
└── AI service
How we work
A use-case decision
Polling asks for a new state at intervals and can be the simplest sufficient choice when changes are rare. A persistent WebSocket connection helps with low latency or many clients, but needs reconnects, heartbeats, authorisation and monitoring. Backpressure protects a receiver that cannot process messages fast enough.
Example scenario
The backend publishes a change; the browser or worker receives only the relevant event.
Backend ↓ publish Broker ↓ event Browser
Describe the event, users and expected behaviour.