Build a back-end management system for ASP. Mvc4+ef5+easyui+unity2.x Injection (39)-on-line population statistics

Source: Internet
Author: User

Series Catalogue

Web-based online statistics have been in a state of not very accurate! Basically there is no one way to actually count online users!

discuz! NT Online user function is to be done relatively good! Resources

His principle is roughly based on the user's operating interval to determine whether the user is online, can also be understood as the operation of the log, when the system scan log interval is too long will be understood as the user offline, so to constantly update the Operation table and operation table growing trouble, so must be scheduled to clear the Operation table, when the system starts to reset table data!

Think of MVC's own filters to record operations before or after executing the method! than discuz! NT operation may come in handy, though the idea is the same!

I personally think that it is not accurate to count the number of people online with the session and Applocation objects in the regular website. Users do not exit the user and close the site caused by the 20-minute buffer of the session is not accurate, but there is another idea in the system, because the system is usually in a large frame of the page, the user to the non-safe exit and shut down the system behavior can use JS to monitor, and through Ajax to update the number of users online , it should be possible!

I'm going to do it this way online, using applocaition to store online numbers, and online listings. Update online numbers and online listings when the page is closed, but consider the concerns of multiple system pages coexisting!

I don't know how people are now counting online numbers and online listings!

But the usual method is already clear, want the accurate statistic must pay more performance to consume!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.