webxdc / store

XDC store, migrated to codeberg
https://codeberg.org/webxdc/store
5 stars 0 forks source link

Do not send updated XDCs without user request #166

Closed link2xt closed 1 year ago

link2xt commented 1 year ago

Currently when user requests a new app index, bot also sends download responses for each updated app, even though user did not request these .xdc updates: https://github.com/webxdc/store/blob/50931d8e94c835062476d917c2906381b9663af8/src/request_handlers/store.rs#L116-L123

I likely missed a discussion on this, but I do not like how this works for users with limied bandwidth. If some app makes minor releases every day, I do not want to update it, or only want to update it when I am on free Wi-Fi.

Septias commented 1 year ago

Had a discussion about this, I guess @hpk42 can tell you a bit more about it

link2xt commented 1 year ago

Ok, will ask, let's ignore it for the discussion in #162 and assume there that the user did not download any apps, otherwise optimizing AppInfo does not help much when the largest part is the apps themselves sent on each update.

r10s commented 1 year ago

unless things have changed again, imu, the "download" function does not "download an app in some version" but "marks apps that the user wants to keep for sharing, in the most recent version". this includes initial download as well as subsequent downloads.

this way, always the most recent version is shared.

the advantage of this is less UI, eg. no need to offer two buttons (share and update), easier implementation in the bot, less states.

beside these pragmatic implementation advantages, however, this also seems to be more the gist of what the user usually wants. also, less things, the user has to take care of and less decisions.

at "Details", there is an option to remove an app from caching.

limited bandwidth is of course a valid consideration, however, decided to being ignored for now.

in practise, we'll see if that really becomes and issue, eg. if really lots of larger apps are being updated every day. and how that relates to overall bandwidth consumption. and if really leaving the update decision to the user is the better tradeoff.

@Septias and @hpk42 - please correct me, your are more involved in store things :)

@Septias maybe you can explain things and reasoning in the README

Septias commented 1 year ago

Nice summary @r10s

Septias commented 1 year ago

Are you okay with closing this @link2xt?