Yarn

Recent twts in reply to #sddvhlq

Man my math is rusty as hell πŸ˜… Trying to work out how to calculate some kind of moving average for a feeds update frequency to use as a way to do some kind of exponential back-off for feeds πŸ˜‚

​ Read More

@will@twtxt.net In general basically. But yes, a way to intelligently reduce traffic between pods and between pods and external feeds. The refresh field recently added to the spec is a β€œmanual” / β€œhuman” driven optional field. But I’d love it if yarnd could just work out whether it should refresh a feed or not based on historical data of how often it was posted to.

​ Read More

But so far I end up with values like this:

DEBU[0481] Moving Average for http://10.0.0.109:9000/twtxt.txt = 2998.23
DEBU[0481] Moving Average for https://twtxt.net/user/prologic/twtxt.txt = 3427.83
DEBU[0481] Moving Average for http://10.0.0.109:8000/user/stats/twtxt.txt = 0.00
DEBU[0481] Moving Average for http://10.0.0.109:8000/user/help/twtxt.txt = 0.00
DEBU[0481] Moving Average for http://10.0.0.109:8000/user/twtxt/twtxt.txt = 0.00
DEBU[0481] Moving Average for http://10.0.0.109:8000/user/admin/twtxt.txt = 1.00

​ Read More

Okay this is better, using a β€œwindow” is producing better results:

DEBU[0241] Moving Average for https://twtxt.net/user/prologic/twtxt.txt = 181.25
DEBU[0241] Moving Average for http://10.0.0.109:8000/user/admin/twtxt.txt = 1.00
DEBU[0241] Moving Average for http://10.0.0.109:8000/user/twtxt/twtxt.txt = 0.00
DEBU[0241] Moving Average for http://10.0.0.109:8000/user/help/twtxt.txt = 0.00
DEBU[0241] Moving Average for http://10.0.0.109:9000/twtxt.txt = 4.17

​ Read More

Okay cool, now my moving average for my own feed is going up as expecgted:

DEBU[0005] Moving Average for https://twtxt.net/user/prologic/twtxt.txt = 255.29
DEBU[0060] Moving Average for https://twtxt.net/user/prologic/twtxt.txt = 442.47
DEBU[0120] Moving Average for https://twtxt.net/user/prologic/twtxt.txt = 562.78
DEBU[0180] Moving Average for https://twtxt.net/user/prologic/twtxt.txt = 652.96
...

Now let’s see if it goes down as I post most frequently πŸ˜…

​ Read More

@prologic@twtxt.net oh, you explained about the Moving average a few tweets (?) before…
I missed that msg! Nice, it brings me memories of a very old project to parse RSS and a few Leaderboards where I’ve used some statistical functions/weird math.

Good vibes with what you are doing!

​ Read More

Participate

Login to join in on this yarn.