Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
75 lines (70 sloc) 3.92 KB
---
# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
title: "The Vespa Container"
---
<p>
The Vespa Container (also known as QRS or JDisc) is the home of all application specific plug-ins in Vespa.
It can also be used to build standalone server applications, but in Vespa it is
the basis of the search container and document processing. As the <em>Search Container</em>,
it handles all incoming queries, and returns results.
As the <em>Document Processor Container</em>, all documents fed pass through it.
In both cases, this allows plug-ins to process or modify all queries, results and documents based on application requirements.
</p><p>
The Container provides a development and hosting environment for
processing <em>components</em>, and a model for composing such components
developed by multiple development teams into a functional whole. The goal is to
allow query, result and document processing to grow to great levels of
sophistication by providing a strong component model including isolation,
while still providing great development ergonomics
to allow developers to experiment with new functionality.
</p><p>
Main features:
<ul>
<li>An <a href="jdisc/developing-osgi-bundles.html">OSGi</a> based component model which
allows deployment and un-deployment of components to a cluster of running
instances, as well as isolation and controlled sharing of classes between components</li>
<li>A general model of Documents, Queries, Results and the components processing them</li>
<li>A composition mechanism – <em><a href="chained-components.html">chains</a></em> –
for building applications from components and managing the execution order dependencies</li>
</ul>
The container comes bundled with a framework
for <a href="federation.html">federating</a> applications.
It is run by all the <strong>container nodes</strong> in a Vespa installation.
</p>
<h2 id="plugins">Plug-ins</h2>
<p>
The plug-ins in a container may be a general component, just using
the OSGi integration of the container to deploy arbitrary application
specific components, or it may be one of the types of components
defined by Vespa itself.
The plug-ins used by Vespa are <em><a href="searcher-development.html">searchers</a></em>,
<em><a href="docproc-development.html">document processors</a></em>
(<em>docprocs</em>), <em>handlers</em> and
<em><a href="result-rendering.html">renderers</a></em>.
Searchers are result and query processors.
Document processors transform or analyse all documents fed to Vespa.
Handlers are used to handle user requests which should not be processed directly by any searcher,
e.g. building web services which then generate searches.
Renderers are used to render result pages when responding to a request.
</p><p>
Searchers and document processors are executed in chains. A query is passed from
searcher to searcher in a chain. The searchers are executed in a synchronous
fashion, each taking ownership of the query passed to them. Searcher order is in
other words execution order, a searcher which is before some other searchers,
gets the query before these searchers. Since the result is returned through the
same chain, a searcher early in the chain, will be late to access the result.
Document processor chains do not return any kind of results, they only pass on
the processed documents to the next component.
</p><p>
All kinds of components are usually deployed as OSGi bundles in the Vespa
application package.
</p>
<h2 id="plugins-upgrade">Upgrade of Plug-ins</h2>
<p>
When a new version of the application is deployed, a new instance of the plugin is created.
There is a period of time during which the new and old version of the plugin run concurrently.
</p><p>
All new requests will be forwarded to the new plugin instance, while the old requests
are finished by the old instance, and then the old instance is deconstructed.
This allows upgrade of the application without any disruption in service.
</p>