User:APatro (WMF)/RESTBase Sunsetting
Appearance
Reading material
[edit]- Manual:Architectural modules/Parser
- https://miro.com/app/board/uXjVOi-LVy0=/ - an overview of the data flow in the parsoid endpoints, when and how we do stashing and caching, and what we are changing
- https://miro.com/app/board/uXjVOqd1rj0=/ - an overview of how HTML is shoveled around between parsoid, the cache and the stash
Glossary
[edit]- ParsoidOutputAccess - Service for getting parsoid outputs and warms the cache with pregenerated outputs.
- ParserCache - Cache for
ParserOutput
objects corresponding to the latest page revisions. TheParserCache
is a two-tiered cache backed byBagOStuff
which supports varying the stored content on the values ofParserOptions
used during a page parse. - ParsoidOutputStash - Parsoid HTML and Parsoid metadata from storage. Add stash option to
/page/html
&/revision/html
endpoints. When this option is set, thePageBundle
returned byParsoid
is stashed and an etag is returned that can later be used to make use of the stashed PageBundle. - PageBundle (PB): Returned by the
ParsoidOutputStash
. Represents a parsed page fromParsoid
.PageBundle
is equivalent to the givenParserOutput
. - WikitextContentHandler - Content handler for wiki text pages.
ContentHandler
instances are stateless singletons that serve, among other things, as a factory for Content objects. Generally, there is one subclass ofContentHandler
and one subclass ofContent
for every type of content model. - RevisionRenderer - The
RevisionRenderer
service provides access to rendered output for revisions. It does so by acting as a factory forRenderedRevision
instances, which in turn provide lazy access toParserOutput
objects. - RenderedRevision -
RenderedRevision
represents the rendered representation of a revision. It acts as a lazy provider ofParserOutput
objects for the revision's individual slots, as well as a combinedParserOutput
of all slots. - ParserOptions - The parsing of wikitext is based on the applied
ParserOptions
.ParserOptions
are initialized from theRequestContext
where theLanguage
andUser
are the two important parameters. - ParserOutput - The result of parsing is stored as the
ParserOutput
object. The main attribute here ismText
, that holds the whole HTML representation of the article content. Besides thatParserOutput
holds separately categories, links, images, sections, templates and other "parts" of the article as variables. Moreover, it holds information relevant for caching – cache time, expiry and revision. After theParserOutput
is produced, the values of its attributes are set to theOutputPage
object. - PoolWorkArticleView - After the wikitext is parsed and
ParserOutput
is created (inPoolWorkArticleView::doWork()
), the output will be cached if cache expiry > 0 and we are dealing with the latest revision of the article. - PageContentHelper - Used for accessing page content. Introduced in https://gerrit.wikimedia.org/r/c/mediawiki/core/+/642652
- ParsoidClient - Client to convert wikitext to html and html to wikitext using the Parsoid. Different implementations of this exist, such as
VRSParsoidClient
andDirectParsoidClient
. - ParsoidHandler - Base class for Parsoid handlers.
- TransformHandler - REST API Handler for transforming content given in the requests:
/v1/transform/{from}/to/{format}
,/v1/transform/{from}/to/{format}/{title}
,/v1/transform/{from}/to/{format}/{title}/{revision}
. Extends theParsoidHandler
. - VRSParsoidClient - A
ParsoidClient
that does transformation using the REST API. See patch. - DirectParsoidClient - Previously the
VisualEditorParsoidClient
. Uses the Parsoid directly for transformation, and not the REST interface. See patch. - WTTransform - Logic to transform wikitext to HTML.
- HTMLTransform - Logic to transform HTML to wikitext. See patch.
- HtmlOutputRendererHelper - Helper for getting output of a given wikitext page rendered by Parsoid.
- HtmlInputTransformHelper