You are browsing a read-only backup copy of Wikitech. The live site can be found at wikitech.wikimedia.org

Mobileapps (service): Difference between revisions

From Wikitech-static
Jump to navigation Jump to search
imported>Mholloway
No edit summary
 
imported>Quiddity
Line 1: Line 1:
The '''mobileapps''' service (a.k.a. "'''mobile content service'''") provides a [[:en:Facade_pattern|facade]] through which Wikimedia content is requested, modified to remove unnecessary bits, put into a form most readily consumable by the mobile apps, and sent on to the client.  The underlying content is primarily [[mw:Parsoid|Parsoid]] HTML fetched via a request to [[mw:RESTBase|RESTBase]]'s page HTML endpoint, modified, and then stored again in RESTBase for retrieval via the <code>/mobile-sections</code> endponts.
The '''mobileapps''' service (a.k.a. "'''mobile content service'''") provides a [[:en:Facade_pattern|facade]] through which Wikimedia page content is requested, modified to remove unnecessary bits, put into a form most readily consumable by the mobile apps, and sent on to the client.  The underlying content is primarily [[mw:Parsoid|Parsoid]] HTML fetched via a request to [[mw:RESTBase|RESTBase]]'s page HTML endpoint, modified, and then stored again in RESTBase for retrieval via the <code>/mobile-sections</code> endpoints.


Mobileapps runs on [[Service Cluster B]] alongside a number of other node.js services.  Use of content provided by mobileapps was rolled out incrementally to Wikipedia Android app users in early 2016.  The service currently provides article content for all users of the Android app, with certain exceptions.
Mobileapps runs on [[Service Cluster B]] alongside a number of other node.js services.  Use of content provided by mobileapps was rolled out incrementally to Wikipedia Android app users in early 2016.  The service currently provides article content for all users of the Android app, with certain exceptions.


The mobileapps service is maintained primarily by the [[mw:Wikimedia_Reading_Infrastructure_team|Wikimedia Reading Infrastructure team]], with support from the [[mw:Wikimedia_Services|Services]] team.
In addition to the page content, the mobileapps service also provides data for various Explore feed features in both Android and iOS apps. The Explore feed features consist of a general featured feed (comprising of TFA, Picture of the day, most read pages of the previous day, and In the news), On This Day, and wiki and country specific announcements for surveys or fundraising.
 
In the near future the /page/summary endpoint in RESTBase will use this service's implementation. The /page/summary endpoint is also used by web for page previews.
 
The mobileapps service is maintained primarily by the [[mw:Wikimedia_Reading_Infrastructure_team|Wikimedia Reading Infrastructure team]], with support from the [[mw:Wikimedia_Services|Services]] team. Mentioning mobileapps in IRC on the ops channel should get their attention.


== Rollout ==
== Rollout ==
Line 13: Line 17:


After the first failed request to the content service, the app should behave identically to the end user after falling back to the MediaWiki action API.  The only exception is Wiktionary definition functionality, which requires the mobile content service (and will not appear to the user in the relevant context menu if content service loading is unavailable).
After the first failed request to the content service, the app should behave identically to the end user after falling back to the MediaWiki action API.  The only exception is Wiktionary definition functionality, which requires the mobile content service (and will not appear to the user in the relevant context menu if content service loading is unavailable).
A failing mobileapps service could also result in the native apps Explore feed to be significantly reduced.


== External links ==  
== External links ==  
Line 18: Line 24:
[https://en.wikipedia.org/api/rest_v1/#/Mobile Wikimedia REST API mobile endpoints] (link is to enwiki, but the endpoints are the same for all Wikipedias)
[https://en.wikipedia.org/api/rest_v1/#/Mobile Wikimedia REST API mobile endpoints] (link is to enwiki, but the endpoints are the same for all Wikipedias)


[[mw:RESTBase_services_for_apps|RESTBase services for apps]]
[[mw:RESTBase services for apps|RESTBase services for apps]]
 
[[mw:Wikimedia_Apps/Team/RESTBase_services_for_apps/Deployment_process#Refresh_RESTBase_cache|Refresh RESTBase cache for mobileapps]] for troubleshooting and fighting vandalism tips


[[Category:Services]]
[[Category:Services]]

Revision as of 20:24, 21 October 2017

The mobileapps service (a.k.a. "mobile content service") provides a facade through which Wikimedia page content is requested, modified to remove unnecessary bits, put into a form most readily consumable by the mobile apps, and sent on to the client. The underlying content is primarily Parsoid HTML fetched via a request to RESTBase's page HTML endpoint, modified, and then stored again in RESTBase for retrieval via the /mobile-sections endpoints.

Mobileapps runs on Service Cluster B alongside a number of other node.js services. Use of content provided by mobileapps was rolled out incrementally to Wikipedia Android app users in early 2016. The service currently provides article content for all users of the Android app, with certain exceptions.

In addition to the page content, the mobileapps service also provides data for various Explore feed features in both Android and iOS apps. The Explore feed features consist of a general featured feed (comprising of TFA, Picture of the day, most read pages of the previous day, and In the news), On This Day, and wiki and country specific announcements for surveys or fundraising.

In the near future the /page/summary endpoint in RESTBase will use this service's implementation. The /page/summary endpoint is also used by web for page previews.

The mobileapps service is maintained primarily by the Wikimedia Reading Infrastructure team, with support from the Services team. Mentioning mobileapps in IRC on the ops channel should get their attention.

Rollout

Mobileapps usage was rolled out incrementally to Android app users via the restbaseBetaPercent and restbaseProdPercent configuration variables in the MobileApp extension.

Consequences of shutdown/failure

The Android app has implemented a fallback mechanism in which it will temporarily revert to MediaWiki API mobileview requests after a "significant" failure (a page load error other than a 404 or client-side networking error). After falling back to the MediaWiki API, the app will wait for 100 successful requests and then again attempt a request from the mobile content service, falling back again in case of error.

After the first failed request to the content service, the app should behave identically to the end user after falling back to the MediaWiki action API. The only exception is Wiktionary definition functionality, which requires the mobile content service (and will not appear to the user in the relevant context menu if content service loading is unavailable).

A failing mobileapps service could also result in the native apps Explore feed to be significantly reduced.

External links

Wikimedia REST API mobile endpoints (link is to enwiki, but the endpoints are the same for all Wikipedias)

RESTBase services for apps

Refresh RESTBase cache for mobileapps for troubleshooting and fighting vandalism tips