Design of the service "I'm alive"

I am currently developing a system in which we need to know if the user is online / registered.

The system is a .Net web network, so we intend to do this using the AJAX / JSONP code, which pings the server every 2 minutes.

There are a large number of users, so ping every 2 minutes causes approx. 600 pions per second.

Therefore, we intend to host this service on our own server and store all the information in memory using Velocity.

The cache will be heirachy with named pairs of values, the first group, then the person, and the timestamp for each person.

Question: can we write directly to the speed cache for each ping? Or will it lead to blocking? Should we write to the queue first and then update the cache from the queue?

At the same time, when we update the cache, there will be other users requesting information for each group.

+5
source share
1 answer

, , , , , , . , , ( ) (, , ).

nill ( 2 )

Concurrency , MSDN , - .

http://msdn.microsoft.com/en-us/library/ee790890.aspx

+2

All Articles