extiverse / bazaar

The extension marketplace for your Flarum forum.
https://discuss.flarum.org/d/5151
MIT License
58 stars 14 forks source link

Upgrade Flarum from within Bazaar #80

Open luceos opened 6 years ago

luceos commented 6 years ago

In light of the namespace changes for beta 8 I had a little brainstorm with @clarkwinkelmann and @cdk2020 about a strategy to upgrade.

This issue has the form of an epic and possibly needs splitting up into smaller tasks aka user stories.

clarkwinkelmann commented 6 years ago

In order to reduce the flagrow.io payload, we could also switch to pointer-based pagination, where we only get extensions that changed since the last request.

It does not really help to solve the update issue, but would allow us to return all extensions (whether compatible or not, or will-be-incompatible) without using a massive amount of bandwidth (and the required processing) on Bazaar end.

luceos commented 6 years ago

So, never having heard of pointer based systems. The implementation would be like a salt. Whenever Bazaar calls on flagrow.io it would also send along the array of package names and salts so that flagrow.io can identify the updates required. If this is correct;

clarkwinkelmann commented 6 years ago

@luceos not sure how it works, but when you browse files on Dropbox (API doc https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder-continue), each request returns a cursor. You then use that cursor for the next request and you get the new changes.

I don't know if they maintain a list of all opened cursor on Dropbox end, or if the cursor contains the information itself. Simply embedding the filter and a timestamp in the cursor should be enough to let the remote server know where it needs to continue from.