Java Data Intensive Serving Container - JDisc
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 API's 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:
- Configuring components with custom configuration
- Component injection allows components to access other application components
- Learn how to build OSGi bundles and how to troubleshoot classloading issues
- XML processing with JAXB and JAXP (DOM, SAX, StAX)
- Using Libraries for Pluggable Frameworks from a component may result in class loading issues that require extra setup in the application
- Unit testing configurable components
-
Handlers and filters:
- Http servers and security filters for incoming connections on HTTP and HTTPS
- Request handlers to process incoming requests and generate responses
-
Searchers and Document Processors:
- Searcher and search result renderer development
- Document processing
Reference documentation
Other related documents
- Versioning Components
-
Client providers
are capable of connecting to and forwarding requests to a
remote server on a specific protocol, e.g. the
HttpClient
is a client provider for HTTP and HTTPS - To accept incoming connection on other protocols than HTTP/HTTPS, develop custom server providers starting with the tutorial
- The Chain Builder API
- Designing RESTful web services as Vespa Components
- healthchecks - using the Container with a VIP
- Vespa Component Reference: The Container's request processing lifecycle