Data distribution by frequency

Greg Fortune gfortune_ewu at ispchannel.com
Sun Oct 8 15:24:57 EDT 2000


William Park <parkw at better.net> wrote in message
news:mailman.970981996.11915.python-list at python.org...
<snip>

> > Obj1
> > Frequency: 3
> > Obj2
> > Frequency: 2
> > Obj3
> > Frequency: 1
> > Obj4
> > Frequency: 2
> >
> > Should yield
> > [Obj1, Obj2, Obj4, Obj1, Obj3, Obj2, Obj1, Obj4]
>
> Getting correct number of entries is no-brainer,
>     [Obj1] * Frequecy1 + [Obj2] * Frequency2 + ...
> But, how are the items distributed in the list?

Note the frequency.  The items need distributed based on that frequency.
ie, Obj1 gets regular slots on regular time intervals.  Obj2 and 4 should
get reasonably regular intervals where they fit in.  Obj3 gets what is left.
I just need it to correctly divide up the pings to the main router and the
modem so it doesn't ping the router twice and then the modem once and
then...
I need it to be regular so I can say...
"Access to www.yahoo.com is down at 12:42:00
Access to modem is down at 12:43:00
#now I know that it's not just yahoo.com that was down
Access to www.linux.com is down at 12:44:00
Access to main gateway (208.152.6.1) is down at 12:45:00
#no guarentee that my modem is down here, but at least I know my routes
outside are down
Access to somehost is down...
Access to modem is up at ...
#ah ha, modem is back up now
"

This needs to be as reliable as possible so I can know within a couple
minutes of when our connection was down and when it came back up.

Greg


>
> ---William Park, Open Geometry Consulting
>





More information about the Python-list mailing list