MG Software.
HomeAboutServicesPortfolioBlogCalculator
Contact Us
MG Software
MG Software
MG Software.

MG Software builds custom software, websites and AI solutions that help businesses grow.

© 2026 MG Software B.V. All rights reserved.

NavigationServicesPortfolioAbout UsContactBlogCalculatorCareersTech stackFAQ
ServicesCustom developmentSoftware integrationsSoftware redevelopmentApp developmentIntegrationsSEO & discoverability
Knowledge BaseKnowledge BaseComparisonsExamplesAlternativesTemplatesToolsSolutionsAPI integrations
LocationsHaarlemAmsterdamThe HagueEindhovenBredaAmersfoortAll locations
IndustriesLegalHealthcareE-commerceLogisticsFinanceAll industries
PopularBest code editorsFrontend frameworksVite alternativesWordPress alternativesOpenAI vs Anthropic APIRust vs Node.jsAWS vs Google CloudWhat is technical debt?
MG Software.
HomeAboutServicesPortfolioBlogCalculator
Contact Us
MG Software
MG Software
MG Software.

MG Software builds custom software, websites and AI solutions that help businesses grow.

© 2026 MG Software B.V. All rights reserved.

NavigationServicesPortfolioAbout UsContactBlogCalculatorCareersTech stackFAQ
ServicesCustom developmentSoftware integrationsSoftware redevelopmentApp developmentIntegrationsSEO & discoverability
Knowledge BaseKnowledge BaseComparisonsExamplesAlternativesTemplatesToolsSolutionsAPI integrations
LocationsHaarlemAmsterdamThe HagueEindhovenBredaAmersfoortAll locations
IndustriesLegalHealthcareE-commerceLogisticsFinanceAll industries
PopularBest code editorsFrontend frameworksVite alternativesWordPress alternativesOpenAI vs Anthropic APIRust vs Node.jsAWS vs Google CloudWhat is technical debt?
MG Software.
HomeAboutServicesPortfolioBlogCalculator
Contact Us
MG Software
MG Software
MG Software.

MG Software builds custom software, websites and AI solutions that help businesses grow.

© 2026 MG Software B.V. All rights reserved.

NavigationServicesPortfolioAbout UsContactBlogCalculatorCareersTech stackFAQ
ServicesCustom developmentSoftware integrationsSoftware redevelopmentApp developmentIntegrationsSEO & discoverability
Knowledge BaseKnowledge BaseComparisonsExamplesAlternativesTemplatesToolsSolutionsAPI integrations
LocationsHaarlemAmsterdamThe HagueEindhovenBredaAmersfoortAll locations
IndustriesLegalHealthcareE-commerceLogisticsFinanceAll industries
PopularBest code editorsFrontend frameworksVite alternativesWordPress alternativesOpenAI vs Anthropic APIRust vs Node.jsAWS vs Google CloudWhat is technical debt?
MG Software.
HomeAboutServicesPortfolioBlogCalculator
Contact Us
  1. Home
  2. /Knowledge Base
  3. /What is Real-time Software? WebSockets, SSE, and Pub/Sub Explained

What is Real-time Software? WebSockets, SSE, and Pub/Sub Explained

Real-time systems deliver data instantly via WebSockets and Server-Sent Events. From live dashboards and chat to collaborative editing: learn how to build scalable real-time features in SaaS.

Real-time software delivers data and updates to users the instant they become available, without requiring the user to refresh or manually reload. This works through a push model where the server proactively sends data to connected clients as soon as a change occurs. Real-time is the foundation for live dashboards, chat applications, collaborative editing, notifications, and any functionality where latency is unacceptable for the user experience and operational efficiency.

What is Real-time? - Definition & Meaning

What is Real?

Real-time software delivers data and updates to users the instant they become available, without requiring the user to refresh or manually reload. This works through a push model where the server proactively sends data to connected clients as soon as a change occurs. Real-time is the foundation for live dashboards, chat applications, collaborative editing, notifications, and any functionality where latency is unacceptable for the user experience and operational efficiency.

How does Real work technically?

Three primary protocols power real-time communication in web applications. WebSockets provide a persistent, bidirectional communication channel over a single TCP connection. After an initial HTTP handshake, the connection upgrades to the WebSocket protocol, allowing both client and server to send messages without the overhead of repeated HTTP requests. Server-Sent Events (SSE) offer a lighter alternative for unidirectional server-to-client communication. SSE works over standard HTTP, is automatically reconnected by the browser on connection loss, and supports event types for categorization. For use cases like live feeds, dashboard updates, and notifications, SSE is often the better choice over WebSockets due to simpler implementation and better compatibility with existing HTTP infrastructure. Long-polling serves as a fallback strategy where the client opens an HTTP request that the server holds open until new data is available. After receiving the response, the client immediately opens a new request. Long-polling is less efficient but works in any environment where HTTP works. For the backend, several options exist. Socket.io is the most widely used WebSocket framework for Node.js with automatic fallback to long-polling and built-in room and namespace support. Supabase Realtime listens to PostgreSQL database changes via logical replication and pushes updates to connected clients. Pusher and Ably provide managed real-time infrastructure as a service. Scalability requires a pub/sub architecture. With multiple server instances, messages must be shared via a message broker like Redis Pub/Sub or NATS. Each server instance manages a subset of connections and the pub/sub system ensures messages reach all relevant clients regardless of which server they are connected to. For presence (who is online, who is typing), a distributed state store is needed, typically Redis with TTL-based keys. Heartbeat mechanisms detect dropped connections and clean up stale presence information. For reliable message delivery, different guarantee levels exist. At-most-once delivery is the simplest but can lose messages. At-least-once delivery ensures messages arrive but may cause duplicates. Exactly-once delivery is the most complex and requires idempotent consumers that detect duplicates via message IDs. The choice depends on the use case: chat requires at-least-once with deduplication, while live metrics can accept at-most-once delivery due to the continuous data stream.

How does MG Software apply Real in practice?

MG Software implements real-time features primarily through Supabase Realtime, which automatically pushes database changes to connected clients via WebSocket connections. This is ideal for dashboards and collaborative features because updates are directly triggered by database mutations without additional application logic or custom WebSocket servers. For more complex real-time scenarios, such as chat applications with presence, typing indicators, and read receipts, we use Socket.io with a Redis-backed pub/sub architecture. This enables horizontal scaling as the number of concurrent connections grows beyond the capacity of a single server instance. During implementation, we deliberately choose the right protocol per use case: SSE for unidirectional feeds like notifications and activity logs, WebSockets for bidirectional interaction like chat and collaborative editing. Every real-time feature is tested with multiple concurrent clients to verify that updates are delivered reliably. This differentiated approach prevents unnecessary complexity and optimizes server resources.

Why does Real matter?

Real-time functionality has become an expectation for modern SaaS applications. Users no longer accept manually refreshing to see current data. Live dashboards, instant messaging, collaborative editing, and real-time notifications are features that measurably increase engagement, customer satisfaction, and retention. Research consistently shows that immediate feedback loops improve user experience and strengthen the perception of application responsiveness. For SaaS businesses, real-time also provides operational advantages. Real-time monitoring of systems and KPIs enables teams to detect problems before they escalate to customer-facing impact. Live data streams eliminate the delay between an event and the response to it, which is critical in sectors like fintech, logistics, and customer support. Teams that implement real-time alerting significantly reduce their incident response time.

Common mistakes with Real

Teams often reach for WebSockets immediately when Server-Sent Events would suffice for unidirectional communication like notifications and feeds. WebSockets introduce additional complexity around connection management, reconnection logic, and state synchronization that SSE simply does not require. Evaluate per feature which protocol fits best before starting implementation. A second frequent mistake is underestimating scalability requirements. Without a pub/sub architecture using Redis or NATS, messages only reach clients connected to the same server instance. With horizontal scaling, this is a fundamental problem that leads to inconsistent updates across users. Additionally, teams often forget to implement graceful reconnection with state recovery: mobile networks and wifi switch frequently, and without automatic reconnection that catches up on missed messages via a replay mechanism, users lose their context after every brief interruption.

What are some examples of Real?

  • A SaaS dashboard displaying live KPI metrics via Supabase Realtime. When a background process writes new data to PostgreSQL, all connected users receive the update within milliseconds through a Realtime subscription on the metrics table.
  • A chat application with WebSocket connections via Socket.io. The system supports rooms per conversation, typing indicators via presence events, and message delivery receipts. Redis Pub/Sub synchronizes messages between multiple server instances for horizontal scalability.
  • A collaborative document editor where multiple users work on the same document simultaneously. Operational Transformation (OT) or CRDTs handle conflicting edits. Presence shows who is viewing the document and where their cursor is positioned.
  • A notification system using Server-Sent Events to push real-time alerts to users. SSE was chosen over WebSockets because communication is unidirectional and SSE offers automatic reconnection on network interruptions without client-side reconnection logic.
  • A live order status tracker for an e-commerce platform that informs customers in real-time about their order progress. Database triggers in PostgreSQL activate Supabase Realtime subscriptions that push status changes directly to the appropriate user.

Related terms

websocketapimicroservices

Further reading

What is an API?What are microservices?Knowledge BaseWhat Is DevOps? Practices, Tools, and Culture for Faster Software DeliveryReal-time Dashboard Examples - Inspiration & Best PracticesReal-Time Data Dashboards Built for Decision Makers

Related articles

What is a WebSocket? - Definition & Meaning

WebSockets open a persistent, bidirectional channel between browser and server, which is essential for chat, live dashboards, and real-time notifications.

What is a Webhook? - Explanation & Meaning

Webhooks automatically send HTTP callbacks when events occur, enabling real-time notifications and event-driven integrations between systems.

Real-time Dashboard Examples - Inspiration & Best Practices

Visualise live data for instant action. Real-time dashboard examples for IoT sensors, financial markets, and logistics fleet monitoring via WebSockets.

Real-Time Data Dashboards Built for Decision Makers

Stop relying on yesterday's numbers. Build a custom dashboard that streams live data from your systems so every decision is backed by the latest metrics.

Frequently asked questions

WebSockets are the right choice for bidirectional communication like chat, collaborative editing, and gaming. Server-Sent Events suit unidirectional scenarios like live feeds, notifications, and dashboard updates. SSE works over standard HTTP, reconnects automatically in the browser, and is simpler to implement. Choose WebSockets only when the client also needs to send data to the server through the same channel.
Use a pub/sub system like Redis Pub/Sub or NATS as a message broker between multiple server instances. Each server manages a subset of the total connections and the pub/sub system distributes messages to all relevant servers with active subscriptions on the affected channels. Load balancers with sticky sessions keep WebSocket connections on the same server throughout their lifecycle. Monitor active connections per server via metrics dashboards and scale horizontally when the connection limits are reached.
Socket.io provides automatic fallback to long-polling when WebSockets are unavailable due to firewalls, proxies, or restrictive corporate networks. Long-polling simulates real-time through repeated HTTP requests that the server holds open until new data is available to send. Performance and latency are lower than with WebSockets but functionality is fully preserved for the end user. In modern environments, WebSocket blocking is increasingly rare thanks to broader TLS support.
Supabase Realtime listens to PostgreSQL database changes via logical replication on the Write-Ahead Log (WAL). When an INSERT, UPDATE, or DELETE occurs on a table with an active subscription, the change is automatically pushed to all connected clients whose filter matches the modified row. This eliminates the need for custom WebSocket logic and makes real-time features possible purely by performing standard database operations through the Supabase client library.
Presence requires a distributed state store, typically Redis with TTL-based keys that automatically expire when a user is no longer active. Each client sends periodic heartbeats that renew the TTL and confirm the connection is still alive. When heartbeats stop due to a network interruption, the key expires and the user is marked as offline. Supabase offers built-in Presence via Realtime channels that handle this mechanism automatically. Socket.io rooms provide similar functionality for custom implementations.
Conflict-free Replicated Data Types (CRDTs) are mathematically proven data structures that automatically resolve conflicts when multiple users simultaneously modify the same data, without coordination from a central server. Unlike Operational Transformation (OT), CRDTs require no single point of coordination, making them more robust in distributed environments. Libraries like Yjs and Automerge implement CRDTs for JavaScript and are actively used in collaborative editors, whiteboard tools, and real-time databases as their fundamental conflict resolution mechanism.
Test with multiple simultaneous clients connected to the same resource or channel. Verify that updates by one client are visible to all other connected clients within acceptable latency. Simulate network interruptions to validate reconnection behavior and state recovery. Use load testing tools like Artillery or k6 to simulate thousands of concurrent WebSocket connections and identify bottlenecks in the pub/sub layer, memory usage, or server resources before deploying to production.

We work with this every day

The same expertise you are reading about, we put to work for clients across Europe.

See what we do

Related articles

What is a WebSocket? - Definition & Meaning

WebSockets open a persistent, bidirectional channel between browser and server, which is essential for chat, live dashboards, and real-time notifications.

What is a Webhook? - Explanation & Meaning

Webhooks automatically send HTTP callbacks when events occur, enabling real-time notifications and event-driven integrations between systems.

Real-time Dashboard Examples - Inspiration & Best Practices

Visualise live data for instant action. Real-time dashboard examples for IoT sensors, financial markets, and logistics fleet monitoring via WebSockets.

Real-Time Data Dashboards Built for Decision Makers

Stop relying on yesterday's numbers. Build a custom dashboard that streams live data from your systems so every decision is backed by the latest metrics.

MG Software
MG Software
MG Software.

MG Software builds custom software, websites and AI solutions that help businesses grow.

© 2026 MG Software B.V. All rights reserved.

NavigationServicesPortfolioAbout UsContactBlogCalculatorCareersTech stackFAQ
ServicesCustom developmentSoftware integrationsSoftware redevelopmentApp developmentIntegrationsSEO & discoverability
Knowledge BaseKnowledge BaseComparisonsExamplesAlternativesTemplatesToolsSolutionsAPI integrations
LocationsHaarlemAmsterdamThe HagueEindhovenBredaAmersfoortAll locations
IndustriesLegalHealthcareE-commerceLogisticsFinanceAll industries
PopularBest code editorsFrontend frameworksVite alternativesWordPress alternativesOpenAI vs Anthropic APIRust vs Node.jsAWS vs Google CloudWhat is technical debt?