Skip to content

A Semantic Web stream processing solution with declarative data mapping capability based on a modified version of the RMLMapper-java tool and extensions to the StreamingMASSIF framework.

License

Notifications You must be signed in to change notification settings

Orange-OpenSource/SMASSIF-RML

Repository files navigation

SMASSIF-RML

A Semantic Web stream processing solution with declarative data mapping capability based on a modified version of the RMLMapper-java tool and extensions to the StreamingMASSIF framework.

Features

  • RDF stream processing pipelines (based on the StreamingMASSIF framework)

    • RML mapping on streams (based on evolved release of RMLMapper),
    • JSON-LD data forwarding to a downstream Kafka topic,
    • File-based configuration of the pipelines.
  • Demonstration pipelines

    • Kafka producer of random data generator in JSON syntax,
    • RML mapping,
    • Kafka consumer for displaying mapped data in JSON-LD syntax,
    • Automated run through GNU make.

Quick-start

The following quick-start builds the project and starts the demonstration pipeline:

  • Install external librairies: make install-dependencies
  • Build modules: mvn package (rely on Maven 3.6+)
  • Start Kafka broker: make start-kafka (rely on the bitnami/kafka Docker image)
  • Start demo pipeline: make demo-dsm
  • Observe mapping in CLI output
  • Stop pipeline: Ctrl-C
  • Stop Kafka broker: make stop-kafka

The demonstration pipeline is akin to:

demonstration_pipeline

Input sample from the MyKafkaProducer component:

{
    "name": {
        "family_name": "Ondricka",
        "first_name": "Ewald"
    },
    "enemies": ["Casimer"],
    "id": 21,
    "friends": ["Amely"]
}

Output sample from the MyKafkaConsumer component (i.e. after RML mapping, JSON-LD syntax):

[ {
  "@graph" : [ {
    "@id" : "http://example.com/person/21",
    "@type" : [ "http://xmlns.com/foaf/0.1/Person" ],
    "http://example.com/id" : [ {
      "@value" : "21"
    } ],
    "http://xmlns.com/foaf/0.1/familyName" : [ {
      "@value" : "Ondricka"
    } ],
    "http://xmlns.com/foaf/0.1/firstName" : [ {
      "@value" : "Ewald"
    } ],
    "http://xmlns.com/foaf/0.1/friend" : [ {
      "@value" : "Amely"
    } ]
  } ],
  "@id" : "http://example.com/base/myGraph1"
} ]

Usage

We provide 3 modules to construct StreamingMASSIF RDF stream processing pipelines with RML mapping capabilities:

  • rmlmapper-for-streaming: the well-known RMLMapper tool modified for handling data streams. See rmlmapper-for-streaming/README for implementation details and re-engineering notes (i.e. RMLMapper-java vs rmlmapper-for-streaming comparison).

  • massif: adhoc StreamingMASSIF components for building pipelines with the rmlmapper-for-streaming module and allowing forwarding data to a downstream Kafka broker. See massif/README for implementation details and directions for making your own pipeline!

  • data-stream-manager (dsm): implementation of StreamingMASSIF pipelines with external configuration reader, including RML mapping rule set. See dsm/README for implementation details, and browse the module's code for the demonstration pipelines used in the above quick-start section.

Copyright

Copyright (c) 2022-2023, Orange. All rights reserved.

License

BSD-4

Maintainer

About

A Semantic Web stream processing solution with declarative data mapping capability based on a modified version of the RMLMapper-java tool and extensions to the StreamingMASSIF framework.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published