I'm looking for a module that, given a page URL, returns the list of users who are currently viewing it. The list should be dynamically refreshing to show page view activity in real-time.
Is there a module for that?
Check the viewers module. Here is an excerpt from ots project page:
Viewers is a small module, which builds a block showing which other users are viewing the same page as the current user. The 'other' users are logged in users or anonymous users or both users. You can set for how long you want a user appear on the viewers list of each page. And finally you can choose the position of the block from the admin/build/block page.
As stated it won't provide you the functionality of dynamically refreshing to show page view activity in real-time, but you can modify it through the custom code by refreshing the block after a required interval of time. Or you can try the Block Refresh module. Here is an excerpt from ots project page:
Block Refresh allows an administrator to configure a block to refresh it's content via 3 different methods: automatically via a timer (eg every 30 seconds) , manually via a 'refresh' link, and once on page load.
Block Refresh uses jQuery/AJAX so the refresh happens "behind-the-scenes".
Block refresh can be handy to serve fresh content in certain blocks on otherwise cached pages. You can opt to bypass drupal's cache for the refresh callbacks for each block.