Sparql Engine

From Wikitia
Jump to navigation Jump to search
Original author(s)
  • Thomas Minier
  • Corentin Marionneau
  • Thomas Minier
  • Arnaud Grall
  • Corentin Marionneau
  • Merlin Barzilai
  • Julien Aimonier-Davat
Initial release1 September 2018; 3 years ago (2018-09-01)
Stable release
0.7.6 / 9 March 2020; 20 months ago (2020-03-09)
Written inTypeScript
Operating systemCross-platform
Available inEnglish

Sparql-Engine is an open-source framework for building SPARQL query engines in the JavaScript and TypeScript programming languages.

The framework provides an API to build a SPARQL query engine on top of any data storage system, with a heavy focus on the simplicity of ease. For basic usage, users need to implement a simple JavaScript class to get access to a fully-featured query engine.

Sparql-Engine implements the complete SPARQL 1.1 query language[1] and the SPARQL 1.1 Update protocol[2]. It rely on the Volcano Model[3] for evaluating SPARQL queries. It also provides support for non-standard SPARQL features (Full-Text Search, Query Hints, Extended Aggregations functions) inspired by the Blazegraph triple store.

Main features

  • Supports the SPARQL 1.1 query language and the SPARQL 1.1 Update protocol.
  • Supports the evaluation of all SPARQL property Paths[4].
  • Supports Full-Text Search queries.
  • Supports Custom SPARQL functions.
  • Supports Semantic Caching[5], to speed up query evaluation of recurrent patterns.
  • Supports Federated SPARQL queries[6] using SERVICE clauses.

Software Design

The framework is built following the OOP programming paradigm, with three main entities: the Graph, PlanBuilder and Pipeline classes.

The abstract class Graph encapsulates the logic of an RDF Graph over an arbitrary storage system, e.g., a filesystem or a relational-database. It provides methods for inserting and deleting RDF triples, and also for searching RDF triples matching a triple pattern. To implement their own SPARQL query engine, users need to create a subclass of Graph and implement these methods.

The PlanBuilder class is responsible for building physical query execution plans for executing SPARQL queries. It follows a Builder Design Pattern and defines stages builders to generates operators for executing all types of SPARQL operations. For example, the OrderByStageBuilder is invoked when the PlanBuilder needs to evaluate an ORDER BY modifier.

The Pipeline class (and its subclasses) is the main component used to evaluate all SPARQL operations under the Volcano model. It defines basic operations (map, filter, etc) that can be used to implements physical query operators to manipulate intermediate results and evaluate SPARQL queries. By default, the framework uses an implementation based on RxJS, but users can switch to their own implementations at will.


The SaGe software[7] uses the Sparql-Engine framework to provides a widget for executing SPARQL queries in the browser.

Release history

Version number Release date Significant changes
0.7.0 17 February 2020 (2020-02-17) Add automatic caching of Basic Graph Pattern evaluation using the Semantic Cache algorithm, add native support for the bound join algorithm[8], reworked the SPARQL expressions systems to uses the RDF.js data model[9] to represent RDF terms.
0.6.0 22 January 2020 (2020-01-22) Add support for Full-Text Search SPARQL queries, allowing users to execute approximate string matching on RDF Terms retrieved by SPARQL queries, following an approach similar to Blazegraph.
0.5.0 12 May 2019 (2019-05-12) Added support for evaluation of all SPARQL Property Paths, with corresponding W3C tests. This support was developed by Arthur Trottier, Charlotte Cogan and Julien Aimonier-Davat, Master students at the Unversity of Nantes.
0.4.0 28 February 2019 (2019-02-28) Add the support for declaring custom SPARQL functions, implemented by @dwhitney.
0.3.0 8 November 2018 (2018-11-08) Major architectural rework, introducing the PlanBuilder and PipelineEngine classes.
0.2.1 19 September 2018 (2018-09-19) Added support for SPARQL 1.1 Update queries and SPARQL 1.1 Federated queries.
0.1.0 1 September 2018 (2018-09-01) Initial release, with complete support of the SPARQL 1.0 query language.

In the media


External links


  1. "SPARQL 1.1 Query Language". W3C. Retrieved 1 March 2020.
  2. "SPARQL 1.1 Update". W3C. Retrieved 1 March 2020.
  3. Graefe, Goetz; McKenna, William J. (1993). "The Volcano Optimizer Generator: Extensibility and Efficient Search". Proceedings of the Ninth International Conference on Data Engineering: 209–218. doi:10.1109/ICDE.1993.344061.
  4. "SPARQL 1.1 Property Paths". W3C. Retrieved 1 March 2020.
  5. Ren, Qun; Dunham, Margaret H.; Kumar, Vijay (2003). "Semantic Caching and Query Processing". EEE Transactions on Knowledge and Data Engineering. 15 (1): 192–210. doi:10.1109/TKDE.2003.1161590.
  6. "SPARQL 1.1 Federated Query". W3C. Retrieved 1 March 2020.
  7. "SaGe Website". Université de Nantes. Retrieved 1 March 2020.
  8. Schwarte, Andreas; Haase, Peter; Hose, Katja; Schenkel, Ralf; Schmidt, Michael (2011). "FedX: A Federation Layer for Distributed Query Processing on Linked Open Data". The Semantic Web: Research and Applications - 8th Extended Semantic Web Conference (ESWC 2011). 2: 481–486. doi:10.1007/978-3-642-21064-8_39.
  9. "RDF.js Data Model". RDF.js specifications. RDF.js W3C Community Group. Retrieved 1 March 2020.

This article "Sparql Engine" is from Wikipedia. The list of its authors can be seen in its historical. Articles taken from Draft Namespace on Wikipedia could be accessed on Wikipedia's Draft Namespace.