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

@rdfc/sds-storage-writer-ts

v1.0.2

Published

An RDF-Connect processor to write SDS streams into a given storage system

Downloads

139

Readme

A RDF-Connect SDS storage writer

Bun CI npm

Given an SDS stream and its correspondent stream of members, this processor will write everything into a supported data storage system. So far, it only supports MongoDB instances.

SDS stream updates are stored into MongoDB collections for the LDES server to find this information when serving requests.

An example of a SDS data stream with a predefined fragmentation strategy is shown next:

# Member ex:sample1 exists
ex:sample1 a ex:Object;
  ex:x "2";
  ex:y "5".


# <bucketizedStream> contains this member and this member is part of bucket <bucket2>
[] sds:stream <bucketizedStream>;
   sds:payload ex:sample1;
   sds:bucket <bucket2>.

# <bucket1> has a relation to <bucket2>
<bucket1> sds:relation [
  sds:relationType tree:GreaterThanRelation ;
  sds:relationBucket <bucket2> ;
  sds:relationValue 1;
  sds:relationPath ex:x 
] .

With this information, the data of the member is stored in the MongoDB collection, and the required relations are also stored in the database.

Usage

As a RDF-Connect processor

This repository exposes the following RDF-Connect processors:

js:Ingest

This processor can be used within data processing pipelines to write a SDS streams into a MongoDB instance. The processor can be configured as follows:

@prefix : <https://w3id.org/conn#>.
@prefix js: <https://w3id.org/conn/js#>.
@prefix sh: <http://www.w3.org/ns/shacl#>.

[ ] a js:Ingest;
  js:dataInput <inputDataReader>;
  js:metadataInput <inputMetadataReader>;
  js:database [
    js:url <http://myLDESView.org>;
    js:metadata "METADATA";
    js:data "DATA";
    js:index "INDEX";
  ].

As a library

The library exposes one function ingest, which handles everything.

async function ingest(
  data: Stream<string | Quad[]>, 
  metadata: Stream<string | RDF.Quad[]>, 
  database: DBConfig,
) { /* snip */ }

arguments:

  • data: a stream reader that carries data (as string or Quad[]).
  • metadata: a stream reader that carries SDS metadata (as string or Quad[]).
  • database: connection parameters for a reachable MongoDB instance.

Authors and License

Arthur Vercruysse [email protected] Julián Rojas [email protected]

© Ghent University - IMEC. MIT licensed