WMDE/Wikidata/SSR Service

From Wikitech
< WMDE‎ | Wikidata
Jump to navigation Jump to search

This page provides a brief overview of Server-side Rendering Service[1].

Overview

The service is to be introduced in 2019, to initially serve server-side rendered content of the Wikidata/Wikibase "term box", i.e. the part of item/property page UI where labels, descriptions and aliases are shown and could be edited.

The service is used as part of generating the HTML output sent from MediaWiki to user's browser.

The HTML generated server-side is to be optionally "enhanced" by client-side JavaScript

There is a server-side and the client-side variant of the code, which are distributions of the same implementation.

The client-side variant is deployed into wikibase on a file system level through git sub modules.

In case of no configured server-side rendering service or a malfunctioning of it, the client-side code will act as a fallback.[2]

Technology

The SSR service is a node service. It is written in TypeScript. The code is "compiled" to JavaScript using WebPack.

The service uses VueJS as the UI framework.

Architecture

Wikidata Termbox SSR Architecture Diagram
Wikidata Termbox SSR Sequence Diagram

Initial deployment & load details

The initial responsibility of this service will be the rendering of the term box for wikidata items and properties for mobile web views.

Currently wikidata.org gets no more that 80k[3] mobile web requests per day (including cached pages, and non item/property pages).

If we were to assume all of these requests were actually to item and property pages that were not cached this would result in this SSR service being hit 55 times per minute.

(In reality some of these page views are not to item or property pages, and some will be cached) so we are looking at no more than 1 call per second.

References

  1. Source code of the service
  2. wikibase TermboxView falling back to termbox client code mount point DOM element
  3. https://tools.wmflabs.org/siteviews/?platform=mobile-web&source=pageviews&agent=user&range=last-year&sites=wikidata.org