Real Time Web Applications
From Wikipedia:
The real-time web is a network web using technologies and practices that enable users to receive information as soon as it is published by its authors, rather than requiring that they or their software check a source periodically for updates.
Fundamentals of Real Time Web Applications
In our view, a Real Time Web Application must be able to:
Update the user's browser (client) seamlessly at any time, as if directly connected to the server
Receive events and updates from the client without delay
Web-based video games exemplify Real Time Web. Wisej.NET extends this concept to Line of Business Applications.
WebSocket or Polling
When the server supports WebSocket connections, Wisej.NET "pushes" real-time updates to the client at any time. A background task can update connected clients asynchronously by calling Application.Update()
.
Some servers or browsers may not support WebSocket connections and can only use HTTP requests. In these cases, the server cannot contact the browser directly since each HTTP request starts and terminates when the browser contacts the server. One solution is to create a Wisej.Web.Timer
to periodically fire server events and allow Wisej.NET to update the client.
SignalR emulates WebSocket connections using "long polling" - keeping a pending request open to allow server responses, then opening a new suspended request. However:
Each request blocks a thread
Prone to timeout errors
Browsers limit open AJAX requests (4-8), risking request blocking
Without WebSocket support, use automatic polling in Wisej.NET:
Call
Application.StartPolling()
andApplication.EndPolling()
Configure polling
Interval
in the configuration file for non-WebSocket clients
Wisej.NET sends all updates since the last request back to the client with each request. With a background task but no WebSocket connection, the browser updates on every event (timer, click, etc.).
Main Real Time Features in Wisej.NET
Push updates
Wisej.NET applications can update the client during a request or asynchronously from a background task
Modal workflow
Server-side business logic, UI logic, or UI code can display modal dialogs/message boxes and suspend execution until closure
Complete session state
Application state stays synchronized between client/server - refresh at any time to reload full state including modals
Live events
Server code responds to real-time pointer events (mouse movement, wheel, control enter/leave)
Remote methods
Server code can call client JavaScript and vice-versa at any time
Drawing and painting
Last updated