Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MobileApps: Switch to key_value and spec modules #420

Merged
merged 4 commits into from
Nov 18, 2015

Conversation

d00rman
Copy link
Contributor

@d00rman d00rman commented Nov 18, 2015

This PR brings many changes to the MobileApps endpoints in RESTBase. Firstly, this a disruptive change for the public API:

  • /page/mobile-html ceases to exist
  • -html is being dropped from route names of the other endpoints

Secondly, we now store only the latest render for each title, and do so only for the mobile-sections endpoint. Two key_value buckets are used for that: mobileapps.lead and mobileapps.remaining, each storing a part of the response, respectively so that they can be served efficiently, being more popular then the main mobile-sections route.

Thirdly, with regards to refreshing the content, only the mobile-sections route causes content to be regenerated; sending a no-cache request to mobile-sections-lead and mobile-sections-remaining will cause RESTBase to simply return the latest stored content.

Finally, all of the paths have been simplified and moved out of the configuration file into its own spec module.

This PR also brings some improvements and fixes. Namely:

  • the key_value module now accepts compression and updates settings
  • some Content-Type checks in tests have the additional (now-required) charset component
  • in the handler templating code, added return_if to the list of components determining if a request is simple or not
  • for route loading, use hasOwnProperty() to check if a function for a route/method has been defined

@d00rman d00rman self-assigned this Nov 18, 2015
d00rman pushed a commit that referenced this pull request Nov 18, 2015
MobileApps: Switch to key_value and spec modules
@d00rman d00rman merged commit bab9e08 into wikimedia:master Nov 18, 2015
@d00rman d00rman deleted the mobileapps/spec-mod branch November 18, 2015 13:14
@d00rman
Copy link
Contributor Author

d00rman commented Nov 18, 2015

a bit late, but cc @wikimedia/services

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

1 participant