RE: Rudimentary pubsub.py statistics

"Adam Rifkin" <[email protected]>
Newsgroups gmane.comp.web.mod-pubsub.devel
Message-ID <[email protected]>
Note that there's been a polling interface in pubsub.py for a while,
for example

    http://pubsub.knownow.com:8000/kn/server-status

which returns something like

Server status
Up for 4928 seconds; 2100 connections opened (3 still active). 
88be794: ('10.10.22.44', 3256): tunnel sending event uptime 
87239fc: ('10.10.22.44', 3331): handling urlroot request: /server-status 
861c9b4: ('10.10.22.44', 3251): tunnel sending event uptime 

But the hot, live statistics is way sexier to watch

   http://pubsub.knownow.com/beta/kn_apps/statwatch/

for what it's worth.  We're one step closer to being able to see
in real-time as connections come and go -- good for presence.
Next step would be breaking apart

   mod_pubsub/kn_apps/presence1/

into a presence library separate from the app.  And then delve
into fixing the server's route & topic deletion model to accommodate
real-time notifications.  But that'll take a while.

   Adam



-----Original Message-----
From: Adam Rifkin 
Sent: Monday, June 23, 2003 3:57 PM
To: '[email protected]'
Subject: Rudimentary pubsub.py statistics


Committed into cvs is an updated

    mod_pubsub/python_pubsub/pubsub.py

that includes basic statistics, published every second.

Topics are /kn_statistics/%statname%/ where %statname% are:
    starttime
    uptime = time.time() - starttime
    openedconns
    closedconns
    liveconns = openedconns - closedconns

kn_id of each update is also %statname% and
kn_payload is the sampled value at the last update.

pubsub.py also posts all stats to /kn_statistics for compatibility
with the watchdog library.

Net-net is that you can now watch rudimentary server stats.
I checked in an example app called "statwatch" -- it's not
much but it demonstrates what's cool about having statistics:

    http://pubsub.knownow.com/beta/kn_apps/statwatch/

This was inspired by Mike's call-to-action about the
PeopleOnPage app

    http://sourceforge.net/mailarchive/forum.php?thread_id=2627726&forum_id=12984

Live statistics takes us one step closer...

    Adam


-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.