Chapter 3. Short introduction to Sesame's components

Before diving into the internals of Sesame, we will start with a short introduction to Sesame by giving a high-level overview of its components. It's important to have some basic knowledge about this as the rest of this document will often refer to various components that are touched upon here. It is assumed that the reader has at least some basic knowledge about RDF, RDF Schema, OWL, etc. If this is not the case, some introductory articles can be found at the following locations:

We will try to explain the Sesame framework using the following figure, which shows the most prominent components and APIs in Sesame and how they are built on top of each other. Each component/API depends on the components/APIs that are beneath them.

Figure 3.1. A high-level overview of Sesame's most prominent components and their dependencies

A high-level overview of Sesame's most prominent components and their dependencies

All the way at the bottom of the diagram is the RDF Model, the foundation of the Sesame framework. Being an RDF-oriented framework, all parts of Sesame are to some extent dependent on this RDF model, which defines interfaces and implementation for all basic RDF entities: URI, blank node, literal and statement.

Rio, which stands for "RDF I/O", consists of a set of parsers and writers for various RDF file formats. The parsers can be used to translate RDF files to sets of statements, and the writers for the reverse operation. Rio can also be used independent of the rest of Sesame.

The Storage And Inference Layer (SAIL) API is a low level System API (SPI) for RDF stores and inferencers. Its purpose is to abstract from the storage and inference details, allowing various types of storage and inference to be used. The SAIL API is mainly of interest for those who are developing SAIL implementations (typically, triplestore developers), for all others it suffices to know how to create and configure one. There are several implementations of the Sail API, for example the MemoryStore which stores RDF data in main memory, and the NativeStore which uses dedicated on-disk data structures for storage.

The Repository API is a higer level API that offers a large number of developer-oriented methods for handling RDF data. The main goal of this API is to make the life of application developers as easy as possible. It offers various methods for uploading data files, querying, and extracting and manipulating data. There are several implementations of this API, the ones shown in this figure are the SailRepository and the HTTPRepository. The former translates calls to a SAIL implementation of choice, the latter offers transparent client-server communication with a Sesame server over HTTP.

The top-most component in the diagram is the HTTP Server. The HTTP Server consists of a number of Java Servlets that implement a protocol for accessing Sesame repositories over HTTP. The details of this protocol can be found in Sesame's system documentation, but most people can simply use a client library to handle the communication. The HTTPClient that is used by the HTTPRepository is one such library.

While each part of the Sesame code is publicly available and extensible, most application developers will be primarily interested in the Repository API. This API is described in more detail in Chapter 8, Basic Programming with Sesame.