Trying to avoid server traffic

I am using C # ASP.NET MVC 4 Razor

I have a Grid in ASP.NET MVC Razor View that displays user records. Is there a way to show new users in the Grid without sending an asynchronous request to the server every 1 minute?

I searched on Google a lot. Now, finally, I'm sending a request here to get a hint for this solution to avoid server traffic. Since this page will be displayed by at least 20,000 users

+4
source share
2 answers

@Christos approach is correct!, Just to add additional information about this for ASP.NET solution, I would use SignalR, which allows you to implement simple communication between server and client and cross browser (it has several polyfills that if it cannot use web sockets, it will use the event dispatched by the server, and so on), and the best part is that you don't need to worry about this implementation.

Once your clients are connected to the signalR server, you can notify them every time you need to add a new element to the grid.

http://www.asp.net/signalr/overview/getting-started/tutorial-server-broadcast-with-signalr

Hope this helps!

+3
source

/. , , , redis.

- , , , , . , , , , . , , , , , .

, .

, , , - . - , , , .

, , .

+3

Source: https://habr.com/ru/post/1606304/


All Articles