<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/techniques-for-real-time-client-server-communication-on-the-web-signalr-to-the-rescue--pnkms0oaj" -->

---
title: Techniques for real-time client-server communication on...
description: Explains the fundamental challenge of HTTP's request/response model for real-time web communication, covering three workaround techniques: simple Ajax polling,...
canonical: https://daily.dev/posts/techniques-for-real-time-client-server-communication-on-the-web-signalr-to-the-rescue--pnkms0oaj
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Techniques for real-time client-server communication on the web (SignalR to the rescue) | daily.dev
og:description: Explains the fundamental challenge of HTTP's request/response model for real-time web communication, covering three workaround techniques: simple Ajax polling,...
og:url: https://daily.dev/posts/techniques-for-real-time-client-server-communication-on-the-web-signalr-to-the-rescue--pnkms0oaj
og:image: https://api.daily.dev/og/posts/PNkms0Oaj.png
og:image:alt: Techniques for real-time client-server communication on the web (SignalR to the rescue)
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Techniques for real-time client-server communication on the web (SignalR to the rescue)

**[Maarten Balliauw](https://daily.dev/sources/maartenballiauw)** · 5 min read · 0 upvotes · 0 comments

## Summary

Explains the fundamental challenge of HTTP's request/response model for real-time web communication, covering three workaround techniques: simple Ajax polling, long polling, and HTML5 WebSockets, discussing their trade-offs and browser/infrastructure support limitations circa the draft WebSockets spec. Introduces SignalR, a Microsoft ASP.NET library that abstracts over all three techniques to let client JavaScript and server C# call each other's methods seamlessly, with a code example showing a simple hub-based hello-world across client and server.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.maartenballiauw.be/posts/2011-11-29-techniques-for-real-time-client-server-communication>

## Questions this post answers

### What is the difference between Ajax polling and long polling for real-time web updates?

Ajax polling has the client repeatedly request data at fixed intervals, so new server data waits until the next poll, hurting real-time responsiveness. Long polling instead keeps the Ajax connection open until the server has data, then immediately reopens it, eliminating the polling interval but requiring servers to handle many held-open connections, which can exhaust a thread pool unless async handlers are used.

_daily.dev surfaces practical comparisons like this for developers deciding how to architect real-time features._

### How does SignalR let JavaScript and C# code call each other's methods directly?

SignalR hubs let a server-side C# class expose methods that JavaScript clients invoke directly, such as calling SayHelloToAll, while the server can call a JavaScript function like sayHelloToMe on connected clients as if it were a native C# method. SignalR automatically picks the underlying transport (polling, long polling, or WebSockets) based on what client and server support.

_developers building real-time ASP.NET features can track libraries like SignalR as they evolve on daily.dev._

## Similar posts on daily.dev

- [Real-Time at Last: SSE and SignalR in ASP.NET Core](https://daily.dev/posts/real-time-at-last-sse-and-signalr-in-asp-net-core-hfyl1qquh) · We Are .NET · 0 upvotes · 0 comments
- [HTML over WebSockets: real-time SPAs with barely any JavaScript](https://daily.dev/posts/html-over-websockets-real-time-spas-with-barely-any-javascript-xef6zsuxl) · Hacker News · 2 upvotes · 0 comments
- [Server-Sent Events in ASP.NET Core and .NET 10](https://daily.dev/posts/server-sent-events-in-asp-net-core-and-net-10-rqln4wisb) · Milan Jovanović · 25 upvotes · 0 comments

---

Tags: [#webdev](https://daily.dev/tags/webdev)

[View this post on daily.dev](https://daily.dev/posts/techniques-for-real-time-client-server-communication-on-the-web-signalr-to-the-rescue--pnkms0oaj)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Techniques for real-time client-server communication on the web (SignalR to the rescue)","url":"https://daily.dev/posts/techniques-for-real-time-client-server-communication-on-the-web-signalr-to-the-rescue--pnkms0oaj","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/techniques-for-real-time-client-server-communication-on-the-web-signalr-to-the-rescue--pnkms0oaj"},"datePublished":"2026-10-04T13:05:46.036Z","dateModified":"2026-10-04T13:11:17.532Z","description":"Explains the fundamental challenge of HTTP's request/response model for real-time web communication, covering three workaround techniques: simple Ajax polling,...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/dcf46f7da70960a8c0828f21308f2261?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/dcf46f7da70960a8c0828f21308f2261?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Maarten Balliauw","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Maarten Balliauw","logo":"https://media.daily.dev/image/upload/s--rOTg3VYO--/f_auto,q_auto/v1791119043/logos/maartenballiauw?_a=BAMAMicg0","url":"https://daily.dev/sources/maartenballiauw"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/techniques-for-real-time-client-server-communication-on-the-web-signalr-to-the-rescue--pnkms0oaj","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"webdev","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Maarten Balliauw","item":"https://daily.dev/sources/maartenballiauw"},{"@type":"ListItem","position":3,"name":"Techniques for real-time client-server communication on the web (SignalR to the rescue)"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/techniques-for-real-time-client-server-communication-on-the-web-signalr-to-the-rescue--pnkms0oaj#faq","mainEntity":[{"@type":"Question","name":"What is the difference between Ajax polling and long polling for real-time web updates?","acceptedAnswer":{"@type":"Answer","text":"Ajax polling has the client repeatedly request data at fixed intervals, so new server data waits until the next poll, hurting real-time responsiveness. Long polling instead keeps the Ajax connection open until the server has data, then immediately reopens it, eliminating the polling interval but requiring servers to handle many held-open connections, which can exhaust a thread pool unless async handlers are used. daily.dev surfaces practical comparisons like this for developers deciding how to architect real-time features."}},{"@type":"Question","name":"How does SignalR let JavaScript and C# code call each other's methods directly?","acceptedAnswer":{"@type":"Answer","text":"SignalR hubs let a server-side C# class expose methods that JavaScript clients invoke directly, such as calling SayHelloToAll, while the server can call a JavaScript function like sayHelloToMe on connected clients as if it were a native C# method. SignalR automatically picks the underlying transport (polling, long polling, or WebSockets) based on what client and server support. developers building real-time ASP.NET features can track libraries like SignalR as they evolve on daily.dev."}}]}
```

