I need to build a view "preferably a nodejs_view" that could count the number of logged in users that are currently checking a node.

Lets say we have 10 users currently checking node/123, I need to create a view that shows something like this:

node: 123
viewers: 10

viewers: 2

Is there any modules that could provide that? any idea how to build such thing?

  • Problem is with "currently", as HTTP is a stateless protocol. If you want to build such module, you must tell us what do you consider as current viewer, as your server can only know a moment of a request and have no idea if the page was actually displayed or when user navigated away from it. Even opening another node is not a proof he stopped reading previous, thanks to tabbed browsing. – Mołot Sep 25 '13 at 4:48
  • @Mołot What I mean by currently, is that a user has navigated to this page and have not navigated away, I dont care if he opened a new tab. as long as he did not register out or navigate away from that tab he is "currently" on that node. – saadlulu Sep 25 '13 at 8:05
  • What do you mean by "not navigated away"? HTTP does not care about it as it is stateless protocol and does not, in any way, interact with what user is doing after page was displayed on his monitor. So when do you want to assume he did navigated away? – Mołot Sep 25 '13 at 8:08

viewers ,though this module is in drupal 6 but it can give you a good start.

Your Answer

