npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ulysses-tpf

v1.0.1

Published

Ulysses smart client for replicated Triple Pattern Fragments

Downloads

3

Readme

Intelligent clients for replicated Triple Pattern Fragments

Build Status

Abstract

Following the Triple Pattern Fragments (TPF) approach, intelligent clients are able to improve the availability of the Linked Data. However, data availability is still limited by the availability of the TPF servers. Although some existing TPF servers belonging to different organizations already replicate the same datasets, existing intelligent clients are not able to take advantage of replicated data to provide fault tolerance and load-balancing.

In this paper, we propose Ulysses, an intelligent TPF client that takes advantage of replicated datasets to provide fault tolerance and load-balancing. By reducing the load of a server, Ulysses improves the overall Linked Data availability and reduces data hosting cost for organizations. Ulysses relies on an adaptive client-side load-balancer and a cost-model to distribute the load among heterogeneous replicated TPF servers. Experimentations demonstrate that Ulysses reduces the load of TPF servers, tolerates failures and improves queries execution time in case of heavy loads on servers.

Keywords: Semantic Web, Triple Pattern Fragments, Intelligent client, Load balancing, Fault tolerance, Data Replication

Online demonstration

An online version of the Ulysses query engine is available at http://ulysses-demo.herokuapp.com/. Please use the http version of this website, and not the https version, due to Heroku hosting policy.

Installation

Requirements

npm install -g ulysses-tpf

Usage

Usage: ulysses-tpf <servers...> [options]

  Execute a SPARQL query against several servers using adaptive Ulysses

  Options:

    -q, --query <query>        evaluates the given SPARQL query
    -f, --file <file>          evaluates the SPARQL query in the given file
    -t, --timeout <timeout>    set SPARQL query timeout in milliseconds (default: 30mn)
    -c, --catalog <json-file>  a custom catalog contained in a JSON file
    -h, --help                 output usage information

Experimental study

Dataset and queries

We use one instance of the Waterloo SPARQL Diversity Test Suite (WatDiv) synthetic dataset with 10^7 triples, encoded in the HDT format.

Online versions of the generated dataset are available at:

We generate 50,000 DISTINCT queries from 500 templates (STAR, PATH, and SNOWFLAKE shaped queries). Next, we eliminate all duplicated queries, and then pick 100 random queries to be used in our experiments. Queries that failed to deliver an answer due to a query engine internal error with the regular TPF client are excluded from all configurations.

Generated queries are available on Github.

Query execution time and Answer Completeness

Number of servers | p-value | Completeness ------------ | ------------- | ------------- 1 server | 2.83019e-17 | 100% 2 servers | 9.0472e-12 | 100% 3 servers | 5.05541e-12 | 100%

We executed our 100 random queries using Ulysses using one, two and three homogeneous TPF servers. As a baseline, we also executed our queries with the reference TPF client, with one TPF server. In all configurations, Ulysses is able to produce the same answers as the baseline for all queries.

To confirm that Ulysses does not deteriorate query execution time, a Wilcoxon signed rank test for paired non-uniform data was run for the query execution time results obtained by Ulysses, using up to three servers, with the following hypothesis:

  • H0: Ulysses does not change SPARQL query execution time compared to the reference TPF client.
  • H1: Ulysses does not increase SPARQL query execution time compared.

Load distribution with total replication

Average number of HTTP requests received by servers after evaluation of WatDiv queries with total replication.

All servers have same capabilities (homogeneous servers)

plot_total_homo

S1 is three times slower than the others (heterogeneous servers)

plot_total_hetero

Load distribution with partial replication

Average number of HTTP requests received by servers after evaluation of The five queries that generate the most HTTP requests, with partial replication and homogeneous servers.

plot_partial_homo

Execution time under load

Average query execution time with an increasing number of concurrent clients and available servers, using Ulysses client.

plot_exec_time

Fault tolerance

Average HTTP response time when evaluating query 72 using three homogeneous servers (S1, S2, S3) in presence of failures: S1 fails at 5s and S3 fails at 20s.

plot_failures

Load adaptivity

Average number of HTTP requests received by servers S1, S2, S3 during evaluation of query 72. Servers start homogeneous, then S1 access latency is tripled at 20s.

plot_load