For Big Data Serving, writing custom code in plugins is often required -
in Vespa, such plugins (called Components) are run in the Stateless Java Container Cluster:
Query Processors implemented as Searchers
enables query enrichment, rewrites and external data lookup as part of query processing.
Document processors is similar and
operates on incoming documents in an asynchronuous environment for high throughput.
Handlers and renderers are Other Components that lets application owners build rich APIs,
see the Vespa Container.
Find sample applications for all component types in Getting Started,
also see Troubleshooting.
The development cycle is normally create a plugin (based on the sample applications),
deploy it to Vespa, write tests, iterate.
These steps refer to files in
All the Vespa sample applications use the bundle plugin
to build the Components.
A key Vespa feature is code and configuration consistency,
deployed using an application package.
This ensures that code and configuration is in sync, and loaded atomically when deployed.
This is done by generating config classes from config definition files.
In Vespa and application code,
configuration is hence accessed through generated config classes -
read more in the
Cloud Configuration System.
The Maven target generate-sources (invoked by mvn install) uses
After generating config classes, they will resolve in tools like
Examples unit tests are found in
testAddedOrTerm2 illustrates two ways of doing the same test:
Read more in testing.
- The first setting up the minimal search chain for YQL programmatically
- The second uses
com.yahoo.application.Application, which sets up the application package and simplifies testing
Add testing to automate deployments:
System and Staging tests require a (downscaled) full instance,
whereas Production tests evaluates user-defined production metrics.
Vespa Cloud has automated this - find examples in
Read more in automated deployments.
- System Tests for functional tests -
a system test is an integration test that tests the application API endpoints
- Staging Tests to validate the instance before and after the code/config change,
i.e. two test runs with potentially different tests
- Production Tests to validate a production instance before upgrading the next instance
To connect a debugger, use Java Debug Wire Protocol (JDWP) -