-
Notifications
You must be signed in to change notification settings - Fork 13
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
[5pt,9pt] HTTP block #236
Milestone
Comments
RalphSteinhagen
added this to the CALL#4 - OP OpenDigitizer Integration/Deployment milestone
Dec 20, 2023
vimpostor
moved this from 🔖 Selected (3)
to 🏗 In progress
in Digitizer Reimplementation
Dec 21, 2023
vimpostor
added a commit
that referenced
this issue
Feb 5, 2024
In the future we might want to consider using the message port mechanism to trigger the requests. Fixes #236
Merged
Merged
vimpostor
added a commit
that referenced
this issue
Feb 6, 2024
In the future we might want to consider using the message port mechanism to trigger the requests. Fixes #236
vimpostor
moved this from 🏗 In progress
to Finished Implementation (2)
in Digitizer Reimplementation
Feb 6, 2024
vimpostor
added a commit
that referenced
this issue
Feb 15, 2024
In the future we might want to consider using the message port mechanism to trigger the requests. Fixes #236
vimpostor
added a commit
that referenced
this issue
Feb 15, 2024
This block can use both message ports as well as a public member function as a trigger to make requests to a HTTP API (e.g. REST API) and will return the response on its output ports. Fixes #236
vimpostor
added a commit
that referenced
this issue
Feb 15, 2024
This block can use both message ports as well as a public member function as a trigger to make requests to a HTTP API (e.g. REST API) and will return the response on its output ports. Fixes #236
vimpostor
added a commit
that referenced
this issue
Feb 15, 2024
This block can use both message ports as well as a public member function as a trigger to make requests to a HTTP API (e.g. REST API) and will return the response on its output ports. Fixes #236
RalphSteinhagen
moved this from Finished Implementation (2)
to ✅ QA-Accepted/Merged (∞)
in Digitizer Reimplementation
Feb 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Implement a GR 4.0 Block, that can provide its values over a HTTP REST API.
For network calls, the native client will use httplib, the emscripten build will use emscripten’s own Fetch API.
The idea is that the Block will post a GET request to some server, which will then return a response (in the first stage, only raw messages and mime-type export are implemented (i.e. mime-type
application/octet-stream
, later ontext/yaml
and other serialized formats can follow). The Block implementation will then provide the decoded values on its output port(s). For the raw message mime-type, this means one output portOutPort<pmt>
with keysmime-type
andraw-data
.There are a few different ways how to tell the Block when to do a GET request. For example, one idea is to send a GET request every time activity happens on an input port (for now, use
InPort<uint8_t>
). If the Block is supposed to act in an interrupt-style way, long-polling can be used. An input port can be used to signal to the Block whether the subscription should be kept active. The long-polling should work like the already existing OpenCMW schema and should have transparent caching proxy capabilities so that clients subscribing to the same feed can be served efficiently.The URI of the remote server should be changeable at runtime. This requires implementing the
settings_changed(...)
,start()
andstop()
methods.Since HTTP calls may be unreliable (the server may stop responding altogether), a circuit breaker pattern could be used to avoid flooding the server with too many calls in such a scenario and to automatically start allowing calls after some time when the server is up again.
The text was updated successfully, but these errors were encountered: