Vespa's Java container - JDisc, hosts all application components as well as the stateless logic of Vespa itself.
Which particular components are hosted by a container cluster is configured in services.xml. The main features of
JDIsc are:
- HTTP serving out of the box from an embedded Jetty server,
and support for plugging in other transport mechanisms.
- Integration with the config system of Vespa which allows components to
receive up-to-date config
(by constructor injection) resulting from application deployment.
- Dependency injection based on Guice
(Felix), but extended for configs and component collections.
- A component model based on OSGi which allows
component to be (re)deployed to running servers, and to control which APIs they expose to others.
- The features above combine to allow application package changes (changes to components, configuration or data)
to be applied by Vespa without disrupting request serving nor requiring restarts.
- Standard component types exists for
Application components can be of any other type as well and do not need to reference any Vespa API to
be loaded and managed by the container.
- A general chain composition mechanism for components.
Developing Components
-
The JDisc container provides a framework for processing requests and responses,
named Processing - its building blocks are:
-
Chains
of other components that are to be executed serially,
with each providing some service or transform
-
Processors
that change the request and / or the response. They may also
make multiple forward requests, in series or parallel,
or manufacture the response content themselves
-
Renderers
that are used to serialize a Processor's response before
returning it to a client
-
Application Lifecycle and unit testing:
-
Handlers and filters:
-
Searchers and Document Processors:
Reference documentation