Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Working Node Tracker?

by Limbic~Region (Chancellor)
on Sep 23, 2003 at 21:11 UTC ( [id://293688]=monkdiscuss: print w/replies, xml ) Need Help??

All:
I was reading dragonchild's discussion concerning a subscription to a node, a topic that has come up before. The idea is you would get notified if there was a new reply or if the content had changed. I decided I would throw my hat into the ring.

And PerlMonks Node Tracker is born.....

Ok - it is baby Perl. It was my first time doing anything like this. The code is atrocious. I have barely tested it. It is probably bug ridden and security concern laden. I welcome any and all to point these things out (preferably with working patches). Heck, feature/functionality improvements would also not be frowned upon.

See the reply below for code and readme.

Cheers - L~R

Replies are listed 'Best First'.
Re: Working Node Tracker? (spec)
by tye (Sage) on Sep 23, 2003 at 22:02 UTC

    I don't really see how this fits the request. It lets you add (and delete) nodes to be tracked and list nodes that are being tracked, but the only way (as far as I can tell) to check if a "tracked" node has changed is to cycle through the nodes one at a time (and I don't see an interface to make that possible without me retyping each node ID).

    I thought the point of building a list of nodes to be tracked was so that one could be told "here are the new replies to any of your tracked nodes" (either with one page load or via notifications sent out by some cron job).

    Using your current technique of grabbing information, adding such a feature would not be an efficient use of the server. It would refetch the entire thread list for each interesting thread (and fetch that separately for each user who wants to track the same thread) every time someone wants to check.

    To do something like this efficiently, you'd want to use the newest nodes ticker to fetch info about any new nodes since the last time you checked for updates (and not per user). If it becomes popular, then you'd want to not try to fetch info about new nodes if you just did that a short time ago.

                    - tye
      tye,
      Thank you for your comments.

      I thought the point of building a list of nodes to be tracked was so that one could be told "here are the new replies to any of your tracked nodes" (either with one page load or via notifications sent out by some cron job).

      It's possible. This requires 1 call to the XML Node Thread ticker for each thread being tracked, but only a single a single call to the node query XML generator. The sorting out of what node belongs in what thread would be done on the external server. The only way I can think to limit the impact is restrict the number of nodes that can be tracked at any one time.

      Using your current technique of grabbing information, adding such a feature would not be an efficient use of the server. It would refetch the entire thread list for each interesting thread (and fetch that separately for each user who wants to track the same thread) every time someone wants to check.

      I guess my vision of using this tool is slightly different. Users that didn't login for weeks could still see if there were any updates to nodes long gone from Newest Nodes. Since there is not a constant check for updates, the only time the time PerlMonks gets queried is if the user runs a report. I also envisioned different users tracking nodes at different rates.

      Cheers - L~R

      tye,
      After our recent CB conversation and a modification to one of the XML tickers, I believe I can do better. I will start on this soon. Before I announce publicly I would like you to review it, if you don't mind?

      Cheers - L~R

Re: Working Node Tracker?
by PodMaster (Abbot) on Sep 24, 2003 at 07:14 UTC
    Too many forms ;)
    See how perlmonks has those links on top? One takes you to "Newest Nodes"... "Tracked Nodes" is a destination (link please). From there you should be able to "Delete Tracked Nodes" or check/uncheck "Direct Replies Only" (no need to force the user to go through the form and type stuff in).

    Also, kindly involve cookies in the picture because there's no point in logging in every time someone wants to add a node for tracking.

    See this for a good cookie loop ;)

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

Re: Working Node Tracker?
by Limbic~Region (Chancellor) on Sep 23, 2003 at 22:29 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: monkdiscuss [id://293688]
Approved by grinder
Front-paged by broquaint
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2024-03-19 04:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found