<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>Nara, Japan
* Corresponding author.
$ thi-hoang-thi.pham@univ-nantes.fr (T. H. T. Pham); gabriela.montoya@univ-nantes.fr (G. Montoya);
brice.nedelec@univ-nantes.fr (B. Nédelec); hala.skaf@univ-nantes.fr (H. Skaf-Molli); pascal.molli@univ-nantes.fr (P. Molli)</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Continuation Queries: Embracing Timeouts on Public SPARQL Endpoints</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Thi Hoang Thi Pham</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Gabriela Montoya</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Brice Nédelec</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Hala Skaf-Molli</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Pascal Molli</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Nantes Université</institution>
          ,
          <addr-line>LS2N, UMR 6004, F-44000 Nantes</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2025</year>
      </pub-date>
      <volume>000</volume>
      <fpage>0</fpage>
      <lpage>0003</lpage>
      <abstract>
        <p>Public SPARQL endpoints, such as Wikidata, provide essential access points to large-scale knowledge graphs. However, they often sufer from strict timeouts that prevent the retrieval of complete query results. This demonstration presents the first public deployment of passage, a SPARQL query engine that guarantees query completeness through continuation queries. Instead of failing upon timeout, passage returns partial results along with a SPARQL continuation query capable of retrieving the missing results. These continuation queries can be chained iteratively until complete results are obtained. For this demo, attendees can interact with a passage loaded with 13B triples from Wikidata 2025, and observe in detail its operation during their query execution.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Semantic Web</kwd>
        <kwd>Public Knowledge Graph</kwd>
        <kwd>SPARQL Endpoint</kwd>
        <kwd>Continuation Queries</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Public SPARQL endpoints, such as Wikidata1, ofer valuable access to large-scale knowledge graphs.
However, to remain responsive under heavy load, they enforce fair-use policies, including timeouts
and result size limits [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], to prevent a single query from monopolizing server resources. Consequently,
many queries fail to complete, returning partial or no results at all. For instance, consider the query
cite in Figure 1a, which retrieves pairs of articles that cite each other. When executed on the oficial
Wikidata endpoint2, this query times out after 60 seconds and fails to return complete results. The
inability to ensure query completeness undermines both the reliability and usability of public SPARQL
endpoints.
      </p>
      <p>
        In a recent paper [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], we introduced SPARQL continuation queries, a novel approach to overcoming
timeout limitations while preserving compatibility with existing SPARQL infrastructure. The core idea is
simple: when a query exceeds server-imposed limits, the server returns the partial results and a SPARQL
continuation query able to retrieve the missing results. This process can be repeated, allowing users to
recover complete answers by chaining SPARQL continuation queries. To the best of our knowledge, our
approach is the first to ensure completeness, responsiveness, and, more importantly, full compliance
with the SPARQL protocol.
      </p>
      <p>In this demo, we present the first public deployment of SPARQL continuation queries over real-world
data. The passage server embeds two SPARQL query engines within a single Java Virtual Machine: the
standard blazegraph query engine and the continuation-enabled passage query engine. Both query
engines operate on a shared blazegraph journal file (.jnl), ensuring that both query engines access the
same physical storage and indexes, while exposing separate SPARQL endpoints.</p>
      <p>The blazegraph query engine, which powers the Wikidata Query Service, fully supports SPARQL 1.1
but enforces a 60-second timeout that can yield incomplete results for complex queries. In contrast, the
(a) The query cite times out after 60 seconds on the
oficial Wikidata endpoint and returns no results to
the user.</p>
      <p>(b) Using passage, the query cite completes with 37</p>
      <p>
        SPARQL continuation queries, taking 37 minutes
to retrieve its 1210 results.
passage query engine currently supports only core SPARQL [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] but enables query continuation. This
configuration allows users to easily choose which engine to use for executing their SPARQL queries:
passage or blazegraph.
      </p>
      <p>
        As part of the demonstration, the attendees will be able to query a public passage server containing
the 13B statements of Wikidata (as of February 13th, 2025), showcasing:
• Execution of SPARQL queries that time out on blazegraph but complete successfully on passage
using continuations;
• Live inspection of SPARQL queries through the execution of successive SPARQL continuation
queries. Each timeout ofers an opportunity to monitor progress and estimate completion time;
• Integration with the comunica smart client [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], enabling support for SPARQL 1.1 queries beyond
passage’s core SPARQL capabilities. The client decomposes the queries: core SPARQL subqueries
are delegated to the passage engine, while unsupported operators are executed client-side.
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. Continuation Queries at Work</title>
      <p>
        Timeouts play a crucial role in protecting shared infrastructures. An engine that supports SPARQL
continuation queries does not eliminate timeouts; instead, when a query execution is interrupted, the
engine returns partial results and computes a new SPARQL capable of retrieving the missing answers,
called a SPARQL continuation query. A continuation query can itself be interrupted, leading to yet
another continuation query. Assuming that each continuation query makes progress, we have proven
that there exists a finite sequence of continuation queries that returns complete and correct results [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
      </p>
      <p>This demo highlights the sequences of SPARQL continuation queries that occur during query
execution, as illustrated in Figure 2. On the left is the original query cite, which was executed for 1
minute and returned 64 results. In the center is the first continuation query, also executed for 1 minute,
returning 26 results. On the right is the second continuation query, which returned 23 results after
another 1 minute of execution. At this point, the results are still incomplete, and more continuation
queries must be executed to retrieve the remaining answers.</p>
      <p>A key point to note is that, although the engine automatically generates each continuation query to
compute the remaining work, continuation queries are standard SPARQL queries that any user can
read and understand. A human user can inspect it to determine the processed parts of the query and
estimate the remaining time required to complete the query execution. Continuation queries help open
the black box of SPARQL query processing, allowing users to better understand and reason about how
their queries are being executed.</p>
      <p>Estimating remaining time. Users are often interested in estimating how long they will need to wait
for their query to complete fully. In this context, the continuation query, which represents the remaining
work, can be used to estimate the remaining execution time. With the first continuation query of cite
shown in the center of Figure 2, the execution time of the first part of the UNION is marginal; an article
rarely cites millions of others, and 46 citations is already a relatively high number. The primary factor
is OFFSET 4378, applied to the first triple pattern. Given that there are 252,130 articles in total, and 4378
have been processed in one minute, we can roughly estimate the remaining time as 252,130
4378 − 1 ≈ 56
minutes. This is a coarse estimate, since it does not consider citation distribution biases, but it can be
refined after each continuation query. In this case, passage terminates the execution of this query in
~37 minutes, after issuing 37 continuation queries. 3
3cite was executed after clearing the server’s cache.</p>
      <p>(a) passage x comunica query plan
(b) Example of passage subqueries.</p>
      <p>
        Technical view on continuation queries. From a technical perspective, one might be surprised
to see OFFSET without ORDER BY, as OFFSET is generally unreliable when the order of results is not
explicitly defined [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. However, passage extensively uses subqueries comprising a single triple/quad
pattern with an ofset: by assuming a deterministic evaluation order for such patterns, the resulting
triples/quads are always produced in the same order and the OFFSET actually allows skipping results
already produced. Although passage uses the blazegraph engine to satisfy this assumption by
scanning through its augmented B+Tree indexes (the deterministic order is that of the chosen index),
other SPARQL engines based on other indexing data structures (e.g., HDT [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]) can provide deterministic
ordering on single triple/quad patterns.
      </p>
      <p>
        A second remark concerns the evaluation time of a triple/quad pattern with an OFFSET: are all preceding
results read and discarded, or are they eficiently skipped? Again, passage uses blazegraph’s indexing
augmented B+Trees to initialize the departure point of each triple/quad pattern scan. A counter
maintained within each node of the indexes allows passage to directly navigate to the desired ofset in
logarithmic time. Consequently, even on large datasets, the impact of OFFSET on triple/quad pattern
evaluation remains marginal. It is worth noting that passage could use other SPARQL engines providing
such a convenience, such as HDT [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
      </p>
      <p>In summary. Before passage, a timeout was an event to dread; it meant the query had failed, and the
results would not be delivered as expected. With passage, a timeout becomes an event to embrace: it
marks the moment when the first results arrive, progress becomes measurable, and the remaining work
can be estimated.</p>
    </sec>
    <sec id="sec-3">
      <title>3. passage x comunica: Beyond Core SPARQL</title>
      <p>
        Currently, passage provides continuation queries only for core SPARQL queries, i.e., queries with
projections, triple/quad patterns, joins, unions, optionals, binds, and filters [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. passage cannot directly
execute more complex queries like the query top depicted in Figure 3a that retrieves the top 10 brightest
stars, since this query includes a property path, an ORDER BY, and a DISTINCT modifier.
      </p>
      <p>With passage x comunica, we extended the comunica smart client with passage to support full
SPARQL 1.1 queries while ensuring termination. We declared the capacities of the passage endpoint
within comunica, enabling the client to decompose SPARQL queries so that only supported subqueries
are delegated to passage.</p>
      <p>Figure 3 shows the physical plan of top using passage x comunica. Each green square represents
a call to passage. When multiple green squares appear on the same line, this indicates that several
continuation queries were required to complete a subquery. The plan involves several inner joins, and
the query is processed as follows:
1. comunica transitively retrieves all subclasses (wdt:P279) of stars (wd:Q523) from the passage
server;
2. For each found subclass ?x, the original query top is rewritten by replacing the property path
pattern with the triple pattern {?star wdt:P31 ?x};
3. The resulting basic graph pattern now conforms to core SPARQL and can be executed in full by
passage, as shown in Figure 3b;
4. The ORDER BY and LIMIT clauses are applied as solution modifiers on the aggregated results
and executed client-side by comunica.</p>
      <p>Executing  directly on Wikidata results in a timeout. However, with passage x comunica, the
query completes successfully in 19 minutes. It required 689 service queries, transferred 683KB from the
client to the server, and 987KB from the server to the client, ultimately retrieving the top 10 brightest
stars: the Sun, SN 1054, Tycho’s Supernova, Sirius A, Sirius, Canopus, Alpha Centauri, Arcturus, Alpha
Centauri A, Vega. 4 The decomposition may generate many service calls, but termination is guaranteed.
4. Demonstration (https://youtu.be/_yFwC0UAeqA)
We deployed a public endpoint containing the 13B statements of Wikidata as of February 13th, 2025
in a 1.8TB blazegraph journal. The server embeds two SPARQL query engines within a single Java
Virtual Machine: the standard blazegraph query engine5 and our passage query engine6.</p>
      <p>
        We deployed a web user interface available at https://passage-org.github.io/passage-comunica/. It
includes an interactive widget that displays the passage x comunica physical plan, updated in real-time.
Users can type their SPARQL queries or choose among query examples from Wikidata or WDBench [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. 7
      </p>
      <p>Thanks to this setup, we can fairly compare blazegraph and passage side by side on the same
hardware and data, as illustrated in Figure 4. Both engines can execute the same query; users need to
change the endpoint URL: use the /sparql sufix for blazegraph and /passage for passage.</p>
      <p>If your SPARQL query can be executed with blazegraph, we recommend using it. Otherwise, switch
to passage to retrieve partial results, observe progression, diagnose issues such as suboptimal join
orders, and estimate whether the final results are worth waiting for. There is no need to choose one
over the other; this setup ofers the best of both worlds.</p>
      <p>
        The demo is fully live, and users are encouraged to submit their queries and request explanations
about the results and execution behavior.
4top was executed after clearing the server’s cache.
5https://10-54-2-226.gcp.glicid.fr/wikidata/sparql with a 60-second timeout.
6https://10-54-2-226.gcp.glicid.fr/wikidata/passage with a 60-second timeout and 10,000 results limit.
7The web interface, as well as endpoints with smaller datasets, such as WatDiv [8] or WDBench [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], can also be deployed
locally. All code is publicly available on the GitHub platform at https://github.com/passage-org.
      </p>
    </sec>
    <sec id="sec-4">
      <title>5. Conclusion</title>
      <p>passage redefines the meaning of timeouts during SPARQL query processing. Rather than signaling
failure, it becomes an opportunity: the moment when partial results become visible, ofering users both
progress and perspective. Importantly, in our deployment, passage and blazegraph are not alternatives
but complements; they run on the same server, the same data, and combine their strengths in a unified
system.</p>
      <p>Our roadmap includes extending support in passage for more advanced SPARQL features, such as
aggregates (COUNT/COUNT DISTINCT), GROUP BY, and property paths. In addition, we plan to enhance
performance through parallel execution by partitioning single triple/quad patterns using OFFSET with
LIMIT.</p>
    </sec>
    <sec id="sec-5">
      <title>Acknowledgments</title>
      <p>We would like to thank Erwan Boisteau-Desdevises and Izzedine Issa Ahmat for their valuable support
and contributions to this work. This work is supported by the French ANR project MeKaNo – Search
the Web with Things (ANR-22-CE23-0021).</p>
    </sec>
    <sec id="sec-6">
      <title>Declaration on Generative AI</title>
      <p>During the preparation of this work, the authors used https://chatgpt.com in order to: Grammar and
spelling check. After using this tool, the authors reviewed and edited the content as needed and take
full responsibility for the publication’s content.
[8] G. Aluç, O. Hartig, M. T. Özsu, K. Daudjee, Diversified Stress Testing of RDF Data Management
Systems, in: The Semantic Web - ISWC 2014 - 13th International Semantic Web Conference, Riva
del Garda, Italy, October 19-23, 2014. Proceedings, Part I, volume 8796 of Lecture Notes in Computer
Science, Springer, 2014, pp. 197–212. doi:10.1007/978-3-319-11964-9\_13.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>C. B.</given-names>
            <surname>Aranda</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Hogan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Umbrich</surname>
          </string-name>
          , P. Vandenbussche,
          <string-name>
            <given-names>SPARQL</given-names>
            <surname>Web-Querying</surname>
          </string-name>
          <string-name>
            <surname>Infrastructure</surname>
          </string-name>
          :
          <article-title>Ready for Action?</article-title>
          ,
          <source>in: The Semantic Web - ISWC 2013 - 12th International Semantic Web Conference</source>
          , Sydney,
          <string-name>
            <surname>NSW</surname>
          </string-name>
          , Australia,
          <source>October 21-25</source>
          ,
          <year>2013</year>
          , Proceedings,
          <string-name>
            <surname>Part</surname>
            <given-names>II</given-names>
          </string-name>
          , volume
          <volume>8219</volume>
          of Lecture Notes in Computer Science, Springer,
          <year>2013</year>
          , pp.
          <fpage>277</fpage>
          -
          <lpage>293</lpage>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>642</fpage>
          -41338-4\_
          <fpage>18</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>T. H. T.</given-names>
            <surname>Pham</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Montoya</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Nédelec</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Skaf-Molli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Molli</surname>
          </string-name>
          ,
          <article-title>Passage: Ensuring Completeness and Responsiveness of Public SPARQL Endpoints with SPARQL Continuation Queries</article-title>
          ,
          <source>in: Proceedings of the ACM on Web Conference</source>
          <year>2025</year>
          , WWW '25,
          <string-name>
            <surname>Association</surname>
          </string-name>
          for Computing Machinery, New York, NY, USA,
          <year>2025</year>
          , p.
          <fpage>47</fpage>
          -
          <lpage>58</lpage>
          . doi:
          <volume>10</volume>
          .1145/3696410.3714757.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>J.</given-names>
            <surname>Pérez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Arenas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Gutiérrez</surname>
          </string-name>
          ,
          <article-title>Semantics and complexity of SPARQL</article-title>
          ,
          <source>ACM Trans. Database Syst</source>
          .
          <volume>34</volume>
          (
          <year>2009</year>
          )
          <volume>16</volume>
          :
          <fpage>1</fpage>
          -
          <lpage>16</lpage>
          :
          <fpage>45</fpage>
          . doi:
          <volume>10</volume>
          .1145/1567274.1567278.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>R.</given-names>
            <surname>Taelman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. V.</given-names>
            <surname>Herwegen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. V.</given-names>
            <surname>Sande</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Verborgh</surname>
          </string-name>
          , Comunica:
          <string-name>
            <given-names>A Modular</given-names>
            <surname>SPARQL</surname>
          </string-name>
          <article-title>Query Engine for the Web</article-title>
          ,
          <source>in: The Semantic Web - ISWC 2018 - 17th International Semantic Web Conference</source>
          , Monterey, CA, USA, October 8-
          <issue>12</issue>
          ,
          <year>2018</year>
          , Proceedings,
          <string-name>
            <surname>Part</surname>
            <given-names>II</given-names>
          </string-name>
          , volume
          <volume>11137</volume>
          of Lecture Notes in Computer Science, Springer,
          <year>2018</year>
          , pp.
          <fpage>239</fpage>
          -
          <lpage>255</lpage>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>030</fpage>
          -00668-6\_
          <fpage>15</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>C. B.</given-names>
            <surname>Aranda</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Polleres</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Umbrich</surname>
          </string-name>
          ,
          <article-title>Strategies for Executing Federated Queries in SPARQL1.1, in: The Semantic Web - ISWC</article-title>
          <year>2014</year>
          - 13th
          <source>International Semantic Web Conference, Riva del Garda, Italy, October 19-23</source>
          ,
          <year>2014</year>
          . Proceedings,
          <string-name>
            <surname>Part</surname>
            <given-names>II</given-names>
          </string-name>
          , volume
          <volume>8797</volume>
          of Lecture Notes in Computer Science, Springer,
          <year>2014</year>
          , pp.
          <fpage>390</fpage>
          -
          <lpage>405</lpage>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>319</fpage>
          -11915-1\_
          <fpage>25</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>J. D.</given-names>
            <surname>Fernández</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. A.</given-names>
            <surname>Martínez-Prieto</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Gutiérrez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Polleres</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Arias</surname>
          </string-name>
          ,
          <article-title>Binary RDF representation for publication and exchange (HDT)</article-title>
          ,
          <source>J. Web Sem</source>
          .
          <volume>19</volume>
          (
          <year>2013</year>
          )
          <fpage>22</fpage>
          -
          <lpage>41</lpage>
          . doi:
          <volume>10</volume>
          .1016/j.websem.
          <year>2013</year>
          .
          <volume>01</volume>
          .002.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>R.</given-names>
            <surname>Angles</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Buil-Aranda</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Hogan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Rojas</surname>
          </string-name>
          , D. Vrgoč,
          <article-title>WDBench: A Wikidata Graph Query Benchmark</article-title>
          ,
          <source>in: The Semantic Web - ISWC 2022 - 21st International Semantic Web Conference, Virtual Event, October 23-27</source>
          ,
          <year>2022</year>
          ., Springer-Verlag, Berlin, Heidelberg,
          <year>2022</year>
          , p.
          <fpage>714</fpage>
          -
          <lpage>731</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>