run-dsp

module
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2025 License: Apache-2.0

README

Test and build status GitHub Release Go Report Card Project status

RUN-DSP

[!IMPORTANT] RUN-DSP and the gRPC bindings are considered in "pre-alpha" state, this means that things can change heavily in between versions. We will document these changes in the release notes.

RUN-DSP is a lightweight, high-performant, and easy to manage connector for the IDSA Dataspace protocol implemented in the Go programming language. What distinguishes RUN-DSP from other dataspace connectors is that RUN-DSP tried to stay simple to maintain and manage, while allowing non-dataspace-aware applications to interface with a dataspace by means of gRPC.

Overview

RUN-DSP listens for dataspace requests, and queries a provider backend for the relevant information via gRPC calls. This information can be catalog listings, information about a single dataset, and information on how to download the dataset. In dataspace parlance, this would mean RUN-DSP fulfils the provider role.

RUN-DSP can also listen on a port for gRPC control commands, that another application can use to request dataspace operations to be executed by gRPC. The consumer role in dataspace terms. This functionality still requires that the dataspace port is reachable publicly.

As per the dataspace specification, it is possible for RUN-DSP to fulfil the consumer, and provider side from a single installation if properly configured.

Getting started

Demo

You can find how to setup a simple demo dataspace in the dev-dataspace directory.

Development
Local

To start developing on RUN-DSP itself, you can set up a basic setup like this:

First start up the "dataspace" with docker-compose:

$ docker-compose up

Then start RUN-DSP connecting to the reference provider:

$ go run ./cmd/ -c ./conf/localdev.toml server

You can now start hacking and testing RUN-DSP.

In the demo dataspace

The dev-dataspace demo setup can also be used to test and debug RUN-DSP.

Integration
Offering data to a dataspace

To start integrating your own application, and/or data into a dataspace using RUN-DSP, you will have to offer the RUN-DSP provider service gRPC calls. This can either be integrated into your already existing software, or you can build a translation service that translates the gRPC calls into calls that your application already accepts.

Once your provider service supports all the endpoints, all you need to do is set the right configuration, all provider configuration settings are documented in the [server.provider] section of the reference configuration file.

We offer a reference provider that can be used as an example of how to implement the provider service.

Interacting with dataspace participants.

RUN-DSP offers gRPC calls to allow an application to easily interact with other dataspace participants. The RUN-DSP client uses these to implement a basic dataspace client. The control service can be configured using the [server.control] section of the configuration file.

Contributing

We welcome code contributions, but as RUN-DSP is being rapidly developed, it might be wise to open an issue first to discuss any proposed issues.

Directories

Path Synopsis
cmd
dsp
Package dsp manages the dataspace protocol.
Package dsp manages the dataspace protocol.
contract
Package contract contains the Negotiation type and all related code.
Package contract contains the Negotiation type and all related code.
persistence
Package persistence contains the storage interfaces for the dataspace code.
Package persistence contains the storage interfaces for the dataspace code.
persistence/badger
Package badger contains an implementation of the persistance.StorageProvider interface.
Package badger contains an implementation of the persistance.StorageProvider interface.
internal
authforwarder
Package authforwarder is a combination of http middleware and grpc injectors that passes the content of the "Authorization" header from the incoming http request to any outgoing grpc calls.
Package authforwarder is a combination of http middleware and grpc injectors that passes the content of the "Authorization" header from the incoming http request to any outgoing grpc calls.
cfg
Package cfg contains configuration helpers for RUN-DSP.
Package cfg contains configuration helpers for RUN-DSP.
client
Package client contains a client for RUN-DSP, this is the base of all client subcommands.
Package client contains a client for RUN-DSP, this is the base of all client subcommands.
client/authinjector
Package authinjector contains a helper injector that injects an argument in the metadata.
Package authinjector contains a helper injector that injects an argument in the metadata.
client/downloaddataset
Package downloaddataset offers a command to download a dataset.
Package downloaddataset offers a command to download a dataset.
client/getcatalog
Package getcatalog gets a catalog from the requested dataspace provider.
Package getcatalog gets a catalog from the requested dataspace provider.
client/getdataset
Package getdataset offers a command to get the information of specific dataset.
Package getdataset offers a command to get the information of specific dataset.
client/shared
Package shared contains shared constants for the client and all its subcommands.
Package shared contains shared constants for the client and all its subcommands.
server
Package server provides the server subcommand.
Package server provides the server subcommand.
ui
Package ui contains UI functions, mostly output functions at this time.
Package ui contains UI functions, mostly output functions at this time.
Package jsonld contains utility types and functions to handle JSON-LD files.
Package jsonld contains utility types and functions to handle JSON-LD files.
Package logging provides logging utilities.
Package logging provides logging utilities.
mocks
Package odrl contains ODRL code
Package odrl contains ODRL code
Package OID contains tools to work with OIDs.
Package OID contains tools to work with OIDs.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL