ruaok: are you planning to look at db-move again today? Also, what was the simple stuff you talked about earlier, I can get to it today
2017-02-20 05106, 2017
ruaok
I'm feeling a bit under the weather. I'm going to lay down for a bit and see if I can get to it later.
2017-02-20 05134, 2017
hibiscuskazeneko joined the channel
2017-02-20 05142, 2017
ruaok
a small thing... the listens page. the previous version (alpha) had better timestamps on it (x hours ago vs unix timestamp)
2017-02-20 05151, 2017
ruaok
we need to bring back the better timestamps.
2017-02-20 05110, 2017
SothoTalKer
hello :3
2017-02-20 05157, 2017
ruaok
hi SothoTalKer
2017-02-20 05147, 2017
gcilou
good morning, Monday
2017-02-20 05132, 2017
iliekcomputers
ruaok: no rush :), I will work on the timestamps
2017-02-20 05120, 2017
iliekcomputers
Maybe I'll add the listen count to user page also while I'm at it, should be simple, hopefully.
2017-02-20 05141, 2017
iliekcomputers
SothoTalKer: hi :)
2017-02-20 05109, 2017
ruaok
iliekcomputers: sounds simple, no?
2017-02-20 05108, 2017
iliekcomputers
Yeah, it does.
2017-02-20 05124, 2017
iliekcomputers hopes there are no underlying complexities
2017-02-20 05146, 2017
iliekcomputers
Should be a simple query to influx, right?
2017-02-20 05151, 2017
ruaok
would you like to discover them first or should we talk about them now? :)
2017-02-20 05114, 2017
iliekcomputers
Lol
2017-02-20 05139, 2017
ruaok
there are two considerations:
2017-02-20 05150, 2017
ruaok
1. can influx do that? (it can)
2017-02-20 05155, 2017
darwin__ joined the channel
2017-02-20 05103, 2017
ruaok
2. how expensive is this operation?
2017-02-20 05121, 2017
ruaok
might be fine to ask if you have 1000 listens.
2017-02-20 05132, 2017
ruaok
what if you have 10k? 100k? 1M, 10M?
2017-02-20 05149, 2017
ruaok
should you really count 10M rows every time the user page is loaded?
2017-02-20 05158, 2017
ruaok
I think CatQuest would be angry with you.
2017-02-20 05151, 2017
CallerNo6
+1
2017-02-20 05155, 2017
SothoTalKer
gcilou: you got out of bed. i got back from work :)
2017-02-20 05104, 2017
iliekcomputers
I would be angry with myself also :P
2017-02-20 05119, 2017
rvedotrc has quit
2017-02-20 05119, 2017
darwin has quit
2017-02-20 05119, 2017
fs has quit
2017-02-20 05137, 2017
gcilou
SothoTalKer: well I've already taken a calculus test and been at a meeting this morning so.. ;)
2017-02-20 05158, 2017
iliekcomputers
Caching in redis is my first solution to everything, but that won't work well because the listen count can change rapidly.
2017-02-20 05118, 2017
iliekcomputers
Or maybe we keep a listencount in redis for every user and update accordingly
2017-02-20 05127, 2017
flamingspinach joined the channel
2017-02-20 05148, 2017
iliekcomputers
?
2017-02-20 05151, 2017
ruaok
iliekcomputers: good thinking.
2017-02-20 05100, 2017
SothoTalKer
gcilou: busy busy :-)
2017-02-20 05106, 2017
ruaok
but, there is another train of thought that people are converging to....
2017-02-20 05121, 2017
ruaok
if you have 13 listens, its nice to know when you have 14.
2017-02-20 05136, 2017
ruaok
but when you have 138,849 listens, do you care when you have 138,850?
2017-02-20 05121, 2017
ruaok
so, one way to do it is to not give exact figures or to clearly state when the figure was last updated.
2017-02-20 05126, 2017
iliekcomputers
Would be nice to know anyways, imo
2017-02-20 05140, 2017
ruaok
of course, and we should provide that info.
2017-02-20 05144, 2017
SothoTalKer
invent a button on the userpage
2017-02-20 05115, 2017
ruaok
the thing is programmers tend to want to do things very accurately, but often that accuracy doesn't really get consumed by the end user.
2017-02-20 05122, 2017
rvedotrc joined the channel
2017-02-20 05127, 2017
SothoTalKer
depending on how much work it is, you could run a daily/hourly job. and have a button that lets users update it in between, if they really neeed it
2017-02-20 05153, 2017
iliekcomputers
We can do ranges and as SothoTalKer said, add an option for exact values, seems like a good compromise.
2017-02-20 05116, 2017
SothoTalKer
you can listen to 480 3minute songs per day
2017-02-20 05137, 2017
SothoTalKer
that's about 175000 songs per year
2017-02-20 05151, 2017
SothoTalKer
nonstop continuous listening
2017-02-20 05117, 2017
iliekcomputers
People new to LB would still like to see a count updating 😃
2017-02-20 05100, 2017
SothoTalKer
so the 10M listens are a bit over the top ;)
2017-02-20 05151, 2017
ruaok
SothoTalKer: what is the possible downside for doing a cron job?
2017-02-20 05112, 2017
ruaok
iliekcomputers: and yes, of course the count needs to update.
2017-02-20 05126, 2017
SothoTalKer
users don't get live data
2017-02-20 05142, 2017
ruaok
but, given that a song is 3-5 minutes long and a user might go their page a times times during a song, do we need to recompute the count each time?
2017-02-20 05147, 2017
ruaok
SothoTalKer: what else?
2017-02-20 05116, 2017
SothoTalKer
i think you have something on your mind
2017-02-20 05128, 2017
ruaok
i do
2017-02-20 05158, 2017
ruaok
what if you have 1M users in the system.
2017-02-20 05105, 2017
ruaok
and 10k daily users.
2017-02-20 05119, 2017
SothoTalKer
bold goals
2017-02-20 05128, 2017
ruaok
if you recompute the totals once a day, you're going to compute 990,000 totals for naught.
2017-02-20 05135, 2017
SothoTalKer
but i see your point
2017-02-20 05154, 2017
SothoTalKer
is the listen count public?
2017-02-20 05156, 2017
ruaok
I'm just using round numbers as example.
2017-02-20 05106, 2017
ruaok
I think it should be since the data is public.
2017-02-20 05111, 2017
SothoTalKer
if a userpage is browsed, don't calculate it every time. just when the data is too old?
2017-02-20 05139, 2017
ruaok
yep, that is common pattern that works.
2017-02-20 05149, 2017
ruaok
what would be a reasonable update window given this situation?
2017-02-20 05112, 2017
iliekcomputers
Depends on how many listens the user has
2017-02-20 05133, 2017
ruaok
does it?
2017-02-20 05134, 2017
iliekcomputers
If the user is brand new, maybe 15 minutes
2017-02-20 05144, 2017
ruaok
iliekcomputers: I think you're conflating two seperate solutions.
2017-02-20 05119, 2017
ruaok
and do per user update intervals make sense? how could you implement that?
2017-02-20 05139, 2017
ruaok
(not that conflating two separate solutions is bad, mind you)
2017-02-20 05139, 2017
SothoTalKer
the downside of a userpage view based system is that you cannot have a 'top list' :D
2017-02-20 05155, 2017
ruaok
SothoTalKer: I don't follow
2017-02-20 05111, 2017
SothoTalKer
who has the most listens? which song was listened to most?
2017-02-20 05132, 2017
iliekcomputers
ruaok: ranges based on the current number of listens we have cached, when the user page gets requested we check the number of listens in redis and when it was calculated, and then according to this, we update (or don't)
2017-02-20 05144, 2017
r_dunn joined the channel
2017-02-20 05116, 2017
ruaok
I think you're on the right track. how could you simplify your idea?
2017-02-20 05128, 2017
ruaok
consider timeout values of data items stored in redis.
2017-02-20 05109, 2017
iliekcomputers
ruaok: please elaborate
2017-02-20 05158, 2017
ruaok
when you stick a piece of data into redis, you can give it a time-to-live, right?
2017-02-20 05109, 2017
ruaok
after that time, redis dumps it from the cache.
2017-02-20 05120, 2017
iliekcomputers
Oh, I did not realize that
2017-02-20 05147, 2017
ruaok
so, restate your ideas using this concept.
2017-02-20 05150, 2017
Gentlecat
bitmap: some of the trigger functions seem to be the same except for a name
that's the only place I see where it handles `delete` messages
2017-02-20 05105, 2017
hibiscuskazeneko joined the channel
2017-02-20 05140, 2017
Gentlecat
I guess I'll send an email to mineo, this is strange
2017-02-20 05102, 2017
hibiscuskazeneko has quit
2017-02-20 05103, 2017
bitmap
well, maybe it's only indexed by gid, so that's what delete_many needs
2017-02-20 05116, 2017
bitmap
note that delete_1 and delete_3 only have the row id anyway, so doing an extra query for the gid would be redundant there when the indexer has to do it anyway