You are browsing a read-only backup copy of Wikitech. The primary 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>Aklapper
(+{{ptag|mobile-content-service}} - please allow people to find out where to report bugs)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
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, and put into a form tailored for use by mobile clients.  The underlying content is primarily [[mw:Parsoid|Parsoid]] HTML fetched via the REST API, modified, and then stored in RESTBase for retrieval via the <code>/mobile-sections</code> endpoints.
{{ptag|mobile-content-service}}
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, and put into a form tailored for use by mobile clients.  The underlying content is primarily [[mw:Parsoid|Parsoid]] HTML fetched via the REST API, modified, and then stored in RESTBase for retrieval via the <code>/page/summary</code>, <code>/page/mobile-sections</code> and <code>/page/mobile-html</code> and other [[mw:Page_Content_Service|PCS]] 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 the Kubernetes cluster.  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 and iOS apps. It also provides the summary endpoint for [[mw:Page_Previews|Page Previews]] on web, and the native apps.


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.
== Contact info ==


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_Product/Wikimedia_Product_Infrastructure_team|Wikimedia Product Infrastructure team]], with support from the [[mw:Platform Engineering Team|Platform Engineering Team]] team. Mentioning mobileapps in IRC on the ops channel should get their attention. If not you can mention individual team members on the #wikimedia-infrastructure IRC channel.
 
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 ==
 
Mobileapps usage was rolled out incrementally to Android app users via the <code>restbaseBetaPercent</code> and <code>restbaseProdPercent</code> [https://meta.wikimedia.org/static/current/extensions/MobileApp/config/android.json configuration variables] in the [[mw:Extension:MobileApp|MobileApp]] extension.


== Consequences of shutdown/failure ==
== Consequences of shutdown/failure ==
The Android app has implemented a [[gerrit:243689|fallback mechanism]] in which it will temporarily revert to loading content via the action API after a "significant" REST API failure (a page load error other than a 404 or client-side networking error).  After falling back, 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.
For page loads, the app should behave identically from the user's perspective after falling back to the action API.  However, the Wiktionary definition lookup feature requires the mobile content service, and will not be available if the service is unavailable.


A failing mobileapps service could also significantly reduce the content available in the native apps' Explore feed.
Page content and page previews on the Android and iOS apps would not be affected, maybe not immediately since this is behind RESTBase but eventually when pages get edited. (There is no fallback in the Android app anymore.)
Same for page previews on web.


== External links ==  
== External links ==  


[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:Page_Content_Service|PCS]]: summary, mobile-html and related endpoints
[[mw:Mobile_Content_Service|MCS]]: mobile-sections* endpoints


[[mw:RESTBase services for apps|RESTBase services for apps]]
[[mw:RESTBase services for apps|RESTBase services for apps]]

Latest revision as of 17:27, 5 August 2022

The mobileapps service (a.k.a. "mobile content service") provides a facade through which Wikimedia page content is requested, modified to remove unnecessary bits, and put into a form tailored for use by mobile clients. The underlying content is primarily Parsoid HTML fetched via the REST API, modified, and then stored in RESTBase for retrieval via the /page/summary, /page/mobile-sections and /page/mobile-html and other PCS endpoints.

Mobileapps runs on the Kubernetes cluster. 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 and iOS apps. It also provides the summary endpoint for Page Previews on web, and the native apps.

Contact info

The mobileapps service is maintained primarily by the Wikimedia Product Infrastructure team, with support from the Platform Engineering Team team. Mentioning mobileapps in IRC on the ops channel should get their attention. If not you can mention individual team members on the #wikimedia-infrastructure IRC channel.

Consequences of shutdown/failure

Page content and page previews on the Android and iOS apps would not be affected, maybe not immediately since this is behind RESTBase but eventually when pages get edited. (There is no fallback in the Android app anymore.) Same for page previews on web.

External links

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

PCS: summary, mobile-html and related endpoints

MCS: mobile-sections* endpoints

RESTBase services for apps

Refresh RESTBase cache for mobileapps for troubleshooting and fighting vandalism tips