-
Notifications
You must be signed in to change notification settings - Fork 29
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
REST API #31
Comments
After some research into integrating a REST API into SOSS, it's not entirely clear to us how much it makes sense to use SOSS to interface with REST APIs. The REST model does not have a clearly generalized way to integrate with the pub/sub models that SOSS been targeting so far. It seems like a lot of semantic understanding of a REST API is required in order to weave it into a pub/sub system. In our use cases so far, we've found it's more expedient to generate a Python client for the REST API using Swagger. You can find an example of such a generated client here. Then a human who understands how the two ends of the system should tie together can use the generated code to create a simple rclpy node to convert between the RESTful API and the pub/sub API. At that point, SOSS could be used to translate from rclpy node to any of the other pub/sub middlewares that SOSS supports. In theory there's nothing to prevent SOSS from being used in a similar fashion, except that:
If anyone has recommendations for pipelines to generate C++ REST API client code, we'd be happy to revisit this matter. |
@mxgrey many thanks for your elaborate answer. It seems like a lot of semantic understanding of a REST API is required in order to weave it into a pub/sub system. What we want is to 'open' some parts of our system so that these values can be viewed in a web app (probably python web server) and parameters can be altered. Probably using web sockets is even a better option. Do you have suggestions for our use case? |
Sorry for the delayed response, but I think if you're envisioning a constant data stream over a wired connection, then websockets make a lot of sense. Otherwise if it's an intermittent connection (perhaps with a wifi gap in the middle) then a REST API might be more suitable. Realistically both are likely to work just fine in either case, so I think the decision will really depend on the broader context of what's most familiar to your developers, what's demanded by your clients, and what software tools are most accessible for you. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Any indications when this will be finished?
The text was updated successfully, but these errors were encountered: