Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional HowTos #2

Open
hylkevds opened this issue Oct 8, 2020 · 5 comments
Open

Additional HowTos #2

hylkevds opened this issue Oct 8, 2020 · 5 comments

Comments

@hylkevds
Copy link

hylkevds commented Oct 8, 2020

Two HowTos that would be very useful additions to the documentation would be for the use cases:

  • There is an existing HTTP/REST API. How do I make this available using IDS? The chapter "Using IDSCPv2 as a passive (receiving) server component" seems to be in this direction, but how to modify this to REST is not clear.
  • There is an existing MQTT server. How do I wrap this in IDS?
@gbrost
Copy link
Collaborator

gbrost commented Nov 9, 2020

Hi there,

What REST API do you mean? The management API of the Trusted Connector? The existing examples glue also to HTTP.
The examples also include MQTT subscriptions and forward the messages via IDSCP. What is missing?

@hylkevds
Copy link
Author

hylkevds commented Nov 9, 2020

Lets say I have an existing REST service, for example: https://airquality-frost.k8s.ilt-dmz.iosb.fraunhofer.de/v1.1
This service implements the OGC SensorThings API that offers extensive querying capabilities, based on the OASIS OData standard.
I want to make this service available to third parties, using IDS. What steps do I go through to do that?

This example is publicly available, but our real service would, of course, not be. A graphical GUI for this demo service can be found at: https://api4inspire.k8s.ilt-dmz.iosb.fraunhofer.de/servlet/is/127/

In the MQTT example I found (https://industrial-data-space.github.io/trusted-connector-documentation/docs/rest/) the client doesn't actually seem to use MQTT. The client seems to be a REST API that gets data pushed into it using HTTP, not MQTT. In other words, the client is actually a http server.
How do I connect an MQTT client to a MQTT server through IDS?

@gbrost
Copy link
Collaborator

gbrost commented Dec 4, 2020

Hi there, the example works like this: The client (provider) publishes to a mqtt server. The route picks that up and transmits it to the server (consumer). There it is transferred to a REST endpoint. You can instead publish to MQTT on the server side as well. Drop me a mail if things are unclear, please.

@hylkevds
Copy link
Author

hylkevds commented Dec 4, 2020

So how does the MQTT server on the provider side know which topics have subscribers? Or do all topics need to be pre-determined?
Also still doesn't explain how to connect a REST API like the one I mentioned...

@gbrost
Copy link
Collaborator

gbrost commented Dec 7, 2020

They need to be predetermined. You could thin about embedding this in the info model, but after all this is the application layer. For "forwarding" REST APIs, you can create a REST interface inside of a Camel route. You will also get the response routed back to you. This is basic Camel then, the IDSCP is just wrapping the payload.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants