Buses and Actors


On this page

    This page gives an overview of all buses and actors that are used in the default Comunica engines, such as Comunica SPARQL and Comunica SPARQL File Other configurations such as Comunica SPARQL HDT contain additional actors and buses.

    This builds upon the core architecture of actors, mediators, and buses. An overview of how these buses and actors are connected can be found in the SPARQL architecture.

    Init

    Package: @comunica/bus-init

    All Comunica engines start here. This is where they accept generic input parameters, such as CLI arguments.

    Subscribed actors need to implement ActorInit.

    Actors

    NamePackageDescription
    Query@comunica/actor-init-queryInitializes query execution by parsing a given query, optimizing, executing, and serializing results.

    Context Preprocess

    Package: @comunica/bus-context-preprocess

    A bus in which actors can optionally modify the query context.

    Subscribed actors need to implement ActorContextPreprocess.

    Contains no actors yet.

    Query Parse

    Package: @comunica/bus-query-parse

    Parsing an input query into (SPARQL) algebra.

    Subscribed actors need to implement ActorQueryParse.

    Actors

    NamePackageDescription
    SPARQL@comunica/actor-query-parse-sparqlUses SPARQLAlgebra.js for parsing SPARQL query strings into SPARQL algebra.
    GraphQL@comunica/actor-query-parse-graphqlParses GraphQL strings into SPARQL algebra following the GraphQL-LD approach.

    Optimize Query Operation

    Package: @comunica/bus-optimize-query-operation

    Apply optional optimizations to the SPARQL algebra before actual execution. Optionally, a modified context can be returned.

    Subscribed actors need to implement ActorOptimizeQueryOperation.

    Actors

    NamePackageDescription
    BGP to Join@comunica/actor-optimize-query-operation-bgp-to-joinConverts BGPs into join operations.
    Join BGP@comunica/actor-optimize-query-operation-join-bgpMerges joins of multiple BGPs into a single BGP.
    Join Connected@comunica/actor-optimize-query-operation-join-connectedClusters entries within a join operation into separate sub-joins if they are connected by variables.

    Query Operation

    Package: @comunica/bus-query-operation

    Evaluates SPARQL algebra operations.

    Subscribed actors need to implement ActorQueryOperation or ActorQueryOperationTyped.

    Actors

    NamePackageDescription
    Ask@comunica/actor-query-operation-askHandles ASK operations.
    BGP join@comunica/actor-query-operation-bgp-joinHandles BGPs by delegating to @comunica/bus-rdf-join.
    Construct@comunica/actor-query-operation-constructHandles CONSTRUCT operations.
    Describe subject@comunica/actor-query-operation-describe-subjectHandles DESCRIBE operations.
    Distinct hash@comunica/actor-query-operation-distinct-hashHandles DISTINCT operations through hashing.
    Extend@comunica/actor-query-operation-extendHandles EXTEND operations.
    Filter direct@comunica/actor-query-operation-filter-directHandles FILTER operations in a direct, but non-spec-compliant manner.
    Filter Sparqlee@comunica/actor-query-operation-filter-sparqleeHandles FILTER operations using Sparqlee
    From quad@comunica/actor-query-operation-from-quadhandles FROM operations by considering FROM and FROM NAMED as target graph elements in quads.
    Group@comunica/actor-query-operation-groupHandles GROUP BY operations.
    Join@comunica/actor-query-operation-joinHandles join operations by delegating as inner join to @comunica/bus-rdf-join.
    Left join@comunica/actor-query-operation-leftjoinHandles OPTIONAL operations by delegating as optional join to @comunica/bus-rdf-join.
    Minus@comunica/actor-query-operation-minusHandles MINUS operations by delegating as minus join to @comunica/bus-rdf-join.
    Order by direct@comunica/actor-query-operation-orderby-directHandles ORDER BY operations in a direct, but non-spec-compliant manner.
    Order by Sparqlee@comunica/actor-query-operation-orderby-sparqleeHandles ORDER BY operations using Sparqlee
    Path Alt@comunica/actor-query-operation-path-altHandles alt property path expressions.
    Path Inv@comunica/actor-query-operation-path-invHandles inv property path expressions.
    Path Link@comunica/actor-query-operation-path-linkHandles link property path expressions.
    Path Nps@comunica/actor-query-operation-path-npsHandles nps property path expressions.
    Path One or more@comunica/actor-query-operation-path-one-or-moreHandles one-or-more property path expressions.
    Path Seq@comunica/actor-query-operation-path-seqHandles seq property path expressions.
    Path Zero or more@comunica/actor-query-operation-path-zero-or-moreHandles zero-or-more property path expressions.
    Path Zero or one@comunica/actor-query-operation-path-zero-or-oneHandles zero-or-one property path expressions.
    Project@comunica/actor-query-operation-projectHandles SELECT operations.
    Quad pattern@comunica/actor-query-operation-quadpatternHandles triple/quad patterns.
    Reduced hash@comunica/actor-query-operation-reduced-hashHandles REDUCED operations through hashing.
    Service@comunica/actor-query-operation-serviceHandles SERVICE operations.
    Slice@comunica/actor-query-operation-sliceHandles LIMIT and OFFSET operations.
    SPARQL endpoint@comunica/actor-query-operation-sparql-endpointDelegates a full SPARQL query to a SPARQL endpoint if there is only a single SPARQL endpoint source.
    Union@comunica/actor-query-operation-unionHandles UNION operations.
    Values@comunica/actor-query-operation-valuesHandles VALUES operations.
    Update Add@comunica/actor-query-operation-update-add-rewriteHandles ADD operations by rewriting the operation in terms of an insert.
    Update Clear@comunica/actor-query-operation-update-clearHandles CLEAR operations.
    Update Composite Update@comunica/actor-query-operation-update-compositeupdateHandles `composition of multiple SPARQL update operations.
    Update Copy@comunica/actor-query-operation-update-copy-rewriteHandles COPY operations by rewriting the operation in terms of drop and add.
    Update Create@comunica/actor-query-operation-update-createHandles CREATE operations.
    Update Delete Insert@comunica/actor-query-operation-update-deleteinsertHandles INSERT DATA, DELETE DATA, and INSERT/DELETE operations.
    Update Drop@comunica/actor-query-operation-update-dropHandles DROP operations.
    Update Load@comunica/actor-query-operation-update-loadHandles LOAD operations.
    Update Move@comunica/actor-query-operation-update-move-rewriteHandles COPY operations by rewriting the operation in terms of drop and add.

    Query Serialize

    Package: @comunica/bus-query-serialize

    Serializes the query result into a text-based serialization.

    Subscribed actors need to implement ActorQuerySerialize.

    Actors

    NamePackageDescription
    JSON@comunica/actor-query-serialize-jsonSerializes to a simple JSON format.
    RDF@comunica/actor-query-serialize-rdfSerializes to an RDF format by delegating to @comunica/bus-rdf-serialize.
    Simple@comunica/actor-query-serialize-simpleSerializes to a simple format.
    SPARQL CSV@comunica/actor-query-serialize-sparql-csvSerializes to SPARQL/CSV.
    SPARQL JSON@comunica/actor-query-serialize-sparql-jsonSerializes to SPARQL/JSON.
    SPARQL TSV@comunica/actor-query-serialize-sparql-tsvSerializes to SPARQL/TSV.
    SPARQL XML@comunica/actor-query-serialize-sparql-xmlSerializes to SPARQL/XML.
    Stats@comunica/actor-query-serialize-statsSerializes basic statistics.
    Table@comunica/actor-query-serialize-tableSerializes in a simple table format.
    Tree@comunica/actor-query-serialize-treeSerializes to a JSON tree.

    RDF Serialize

    Package: @comunica/bus-rdf-serialize

    Serializes quads to an RDF serialization format.

    Subscribed actors need to implement ActorRdfSerialize.

    Actors

    NamePackageDescription
    JSON-LD@comunica/actor-rdf-serialize-jsonldSerializes to JSON-LD.
    N3@comunica/actor-rdf-serialize-n3Serializes to Turtle, Trig, N-triples, or N-Quads.

    RDF Join

    Package: @comunica/bus-rdf-join

    Handles joining of bindings streams.

    It supports different logical join types, such as inner, optional, and minus joins.

    Subscribed actors need to implement ActorRdfJoin.

    Actors

    NamePackageDescription
    Inner Hash@comunica/actor-rdf-join-inner-hashInner hash join of two entries.
    Inner Nested loop@comunica/actor-rdf-join-inner-nestedloopInner nested loop join of two entries.
    Inner None@comunica/actor-rdf-join-inner-noneInner join between zero entries, and returns a single binding.
    Inner Single@comunica/actor-rdf-join-inner-singleInner join of a single entry, and returns the entry itself.
    Inner Symmetric hash@comunica/actor-rdf-join-inner-symmetrichashInner symmetric hash join of two entries.
    Inner Multi empty@comunica/actor-rdf-join-inner-multi-emptyInner multi-join that accepts any number of inner-join entries of which at least one is empty and returns an empty stream.
    Inner Multi Bind@comunica/actor-rdf-join-inner-multi-bindInner multi-join that inner-joins 2 or more streams by picking the one with the lowest cardinality, binding each item with the remaining operations, and recursively resolving those operations by delegating to @comunica/bus-query-operation.
    Inner Multi sequential@comunica/actor-rdf-join-inner-multi-sequentialInner multi-join by just picking the two of them hierarchically.
    Inner Multi smallest@comunica/actor-rdf-join-inner-multi-smallestInner multi-join by always picking the first two streams with smallest estimate cardinality.
    Minus Hash@comunica/actor-rdf-join-minus-hashAnti-join (minus) of 2 streams using the hash join algorithm. This actor does not support streams that can have undefined values.
    Minus Hash undef@comunica/actor-rdf-join-minus-hash-undefAnti-join (minus) of 2 streams using the hash join algorithm. This actor supports streams that can have undefined values.
    Optional Bind@comunica/actor-rdf-join-optional-bindLeft-join (optional) 2 streams using the bind join algorithm. It binds each item of the first stream with the second operation, and recursively resolving that operation by delegating to @comunica/bus-query-operation.
    Optional Nested loop@comunica/actor-rdf-join-optional-nestedloopLeft-join (optional) 2 streams using the nested loop join algorithm.

    RDF Join Entries Sort

    Package: @comunica/bus-rdf-join-entries-sort

    Determines the order in which join entries should be ordered.

    Subscribed actors need to implement ActorRdfJoinEntriesSort.

    Actors

    NamePackageDescription
    Cardinality@comunica/actor-rdf-join-entries-sort-cardinalityOrders join entries by increasing cardinality.

    RDF Join Selectivity

    Package: @comunica/bus-rdf-join-selectivity

    Calculates or estimates the selectivity of joins.

    Subscribed actors need to implement ActorRdfJoinSelectivity.

    Actors

    NamePackageDescription
    Variable Counting@comunica/actor-rdf-join-selectivity-variable-countingEstimates the selectivity by counting the overlap of variables and non-variables in patterns.

    RDF Resolve Quad Pattern

    Package: @comunica/bus-rdf-resolve-quad-pattern

    Translates a quad pattern into a stream of quad.

    Subscribed actors need to implement ActorRdfResolveQuadPattern.

    Actors

    NamePackageDescription
    Federated@comunica/actor-rdf-resolve-quad-pattern-federatedTranslates the array of sources in the query context into the union of quad streams by resolving each source separately in the RDF Resolve Quad Pattern bus.
    Hypermedia@comunica/actor-rdf-resolve-quad-pattern-hypermediaResolves the quad stream of a resource by interpreting hypermedia links and controls.
    RDF/JS Source@comunica/actor-rdf-resolve-quad-pattern-rdfjs-sourceResolves the quad stream from an RDF/JS Source

    Dereference

    Package: @comunica/bus-dereference

    Dereferences a path or URL into a (generic) stream.

    Subscribed actors need to implement ActorDereference.

    Actors

    NamePackageDescription
    File@comunica/actor-dereference-fileDereferences a local file.
    HTTP@comunica/actor-dereference-http-parseDereferences a remote file.

    Dereference RDF

    Package: @comunica/bus-dereference-rdf

    Dereferences a path or URL into a stream of quads.

    Subscribed actors need to implement ActorDereferenceRdf.

    Actors

    NamePackageDescription
    Parse@comunica/actor-dereference-rdf-parseDereferences RDF using @comunica/bus-dereference. Invokes parsing with @comunica/bus-rdf-parse.

    RDF Parse

    Package: @comunica/bus-rdf-parse

    Parses quads from a serialization format.

    Subscribed actors need to implement ActorRdfParse.

    Actors

    NamePackageDescription
    HTML@comunica/actor-rdf-parse-htmlParses HTML documents by delegating to @comunica/bus-rdf-parse-html.
    JSON-LD@comunica/actor-rdf-parse-jsonldParses JSON-LD.
    N3@comunica/actor-rdf-parse-n3Parses Turtle, Trig, N-triples, or N-Quads.
    RDF/XML@comunica/actor-rdf-parse-rdfxmlParses RDF/XML.
    XML RDFa@comunica/actor-rdf-parse-xml-rdfaParses RDFa in XML.

    RDF Parse HTML

    Package: @comunica/bus-rdf-parse-html

    Parses quads from an HTML document.

    Subscribed actors need to implement ActorRdfParseHtml.

    Actors

    NamePackageDescription
    RDFa@comunica/actor-rdf-parse-html-rdfaParses RDFa.
    Microdata@comunica/actor-rdf-parse-html-microdataParses Microdata to RDF.
    Script@comunica/actor-rdf-parse-html-scriptParses script tags and attempts to parse them by delegating to @comunica/bus-rdf-parse.

    HTTP

    Package: @comunica/bus-http

    Performs HTTP(S) requests.

    Subscribed actors need to implement ActorHttp.

    Actors

    NamePackageDescription
    Memento@comunica/actor-http-mementoImplements the Memento protocol.
    Native@comunica/actor-http-nativePerforms requests using Node's request library.
    Fetch@comunica/actor-http-fetchPerforms requests using the fetch API.
    Proxy@comunica/actor-http-proxyRun requests through a proxy.

    HTTP Invalidate

    Package: @comunica/bus-http-invalidate

    A bus for HTTP invalidation events.

    Subscribed actors need to implement ActorHttpInvalidate.

    RDF Metadata

    Package: @comunica/bus-rdf-metadata

    Extracts the quads relevant for metadata from the stream of data quads.

    Subscribed actors need to implement ActorRdfMetadata.

    Actors

    NamePackageDescription
    All@comunica/actor-rdf-metadata-allConsiders all incoming quads as both data and metadata quads.
    Primary topic@comunica/actor-rdf-metadata-primary-topicSplits off the metadata based on the existence of a foaf:primaryTopic link.

    RDF Metadata Extract

    Package: @comunica/bus-rdf-metadata-extract

    Create an object with metadata for a given metadata quad stream.

    Subscribed actors need to implement ActorRdfMetadataExtract.

    Actors

    NamePackageDescription
    Allow HTTP Methods@comunica/actor-rdf-metadata-extract-allow-http-methodsExtract the Allow HTTP response header.
    Hydra Controls@comunica/actor-rdf-metadata-extract-hydra-controlsExtract controls using the Hydra vocabulary.
    Hydra Count@comunica/actor-rdf-metadata-extract-hydra-countExtract count estimates using the Hydra vocabulary.
    Hydra Page size@comunica/actor-rdf-metadata-extract-hydra-pagesizeExtract page sizes using the Hydra vocabulary.
    Patch SPARQL Update@comunica/actor-rdf-metadata-extract-patch-sparql-updateChecks for the presence of application/sparql-update in the Accept-Patch header.
    Put Accepted@comunica/actor-rdf-metadata-extract-put-acceptedExtracts the Accept-Put HTTP response header.
    Request Time@comunica/actor-rdf-metadata-extract-request-timeExtracts the time it took to request the page in milliseconds.
    SPARQL Service@comunica/actor-rdf-metadata-extract-sparql-serviceExtract SPARQL service description metadata.

    Package: @comunica/bus-rdf-resolve-hypermedia-links

    Determines which links should be followed from the metadata of the current source.

    Subscribed actors need to implement ActorRdfResolveHypermediaLinks.

    Actors

    NamePackageDescription
    Next@comunica/actor-rdf-resolve-hypermedia-links-nextFollow next page links.

    Package: @comunica/bus-rdf-resolve-hypermedia-links-queue

    Creates ILinkQueue instances, which enables different strategies for queueing links.

    Subscribed actors need to implement ActorRdfResolveHypermediaLinksQueue.

    Actors

    NamePackageDescription
    FIFO@comunica/actor-rdf-resolve-hypermedia-links-queue-fifoProvides a link queue following the first in, first out strategy

    RDF Resolve Hypermedia

    Package: @comunica/bus-rdf-resolve-hypermedia

    Handle a source based on the extracted metadata.

    Subscribed actors need to implement ActorRdfResolveHypermedia.

    Actors

    NamePackageDescription
    None@comunica/actor-rdf-resolve-hypermedia-noneThe source is considered a raw RDF file, for which all data quads matching the quad pattern are returned.
    QPF@comunica/actor-rdf-resolve-hypermedia-qpfThe source is considered a Triple/Quad Pattern Fragments interface.
    SPARQL@comunica/actor-rdf-resolve-hypermedia-sparqlThe source is considered a SPARQL endpoint if it has a service description, for which we use the SPARQL protocol.

    RDF Update Quads

    Package: @comunica/bus-rdf-update-quads

    Handle the insertion and deletion of streams of quads for a given destination type.

    Subscribed actors need to implement ActorRdfUpdateQuads or ActorRdfUpdateQuadsDestination

    Actors

    NamePackageDescription
    RDF/JS Store@comunica/actor-rdf-update-quads-rdfjs-storeThe destination is considered an RDF/JS Store.
    Hypermedia@comunica/actor-rdf-update-quads-hypermediaThe destination that handles updates by interpreting hypermedia links and controls.

    RDF Update Hypermedia

    Package: @comunica/bus-rdf-update-hypermedia

    Handle a destination based on the extracted metadata.

    Subscribed actors need to implement ActorRdfUpdateHypermedia.

    Actors

    NamePackageDescription
    SPARQL@comunica/actor-rdf-update-hypermedia-patch-sparql-updateThe destination is considered an HTTP APIs accepting PATCH requests containing SPARQL Update queries (application/sparql-update), such as Solid servers.