TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

"Give me the 100 most recent messages" / syncing channel posts in buddycloud

10 pointsby imaginatorabout 14 years ago

1 comment

jfoutzabout 14 years ago
step 7 would be a lot nicer with message estamates.<p>Even a poor estimate will reduce the amount of data you have to shuffle around a lot. Just a simple moving average of the last 5 posts would give great results.<p>something like<p><pre><code> for(Channel c : channels) { messages = c.requestLastNMessages(estimateForChannel(c)) c.messagesPerHour = requestsPerHour(messages) totalMessagesPerHour += c.messagesPerHour } for(Channel c : channels) { updateEstimate(c, Math.max(5,c.messagesPerHour/totalMessagesPerHour)) } </code></pre> I think you want to keep the moving average in case something bad happens. a buddy might update once a week, but after an accident or something, might update very quickly. you'll want to track that.
评论 #2560775 未加载