Short-polling vs Long-polling for real time web applications?

Just for the sake of argument. Both are http request (xhr), and its at least partially untrue it uses more server resources (depends totally on technology, will explain later). Short polling. Lot of request that are processed as they come on server. Creates a lot of traffic (uses resources, but frees them as soon as … Read more

SignalR – Sending a message to a specific user using (IUserIdProvider) *NEW 2.0.0*

SignalR provides ConnectionId for each connection. To find which connection belongs to whom (the user), we need to create a mapping between the connection and the user. This depends on how you identify a user in your application. In SignalR 2.0, this is done by using the inbuilt IPrincipal.Identity.Name, which is the logged in user … Read more

Differences between hard real-time, soft real-time, and firm real-time?

Hard Real-Time The hard real-time definition considers any missed deadline to be a system failure. This scheduling is used extensively in mission critical systems where failure to conform to timing constraints results in a loss of life or property. Examples: Air France Flight 447 crashed into the ocean after a sensor malfunction caused a series … Read more

How do I plot in real-time in a while loop using matplotlib?

Here’s the working version of the code in question (requires at least version Matplotlib 1.1.0 from 2011-11-14): import numpy as np import matplotlib.pyplot as plt plt.axis([0, 10, 0, 1]) for i in range(10): y = np.random.random() plt.scatter(i, y) plt.pause(0.05) plt.show() Note the call to plt.pause(0.05), which both draws the new data and runs the GUI’s … Read more