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

Optional REST based mechanism to set/get Parameters #310

Open
notthetup opened this issue Jun 27, 2024 · 2 comments
Open

Optional REST based mechanism to set/get Parameters #310

notthetup opened this issue Jun 27, 2024 · 2 comments
Assignees

Comments

@notthetup
Copy link
Collaborator

We would like to have a REST-based mechanism to set and get parameters on all agents in a MasterContainer.

@notthetup notthetup self-assigned this Jun 27, 2024
@notthetup
Copy link
Collaborator Author

Proposed Solution :

  • new method on WebServer to enable this feature.
  • new REST-based routes
    • get ALL normal parameters on an agent GET /api/<agent-name>
    • get ALL indexed parameters on an agent GET /api/<agent-name>/<index>
    • getting normal parameterGET /api/<agent-name>/<parameter-name>
    • getting indexed parameterGET /api/<agent-name>/<index>/<parameter-name>
    • setting normal parameterSET /api/<agent-name>/<parameter-name>
    • setting indexed parameterSET /api/<agent-name>/<index>/<parameter-name>

We need to figure out how to encode the values and types.

@notthetup
Copy link
Collaborator Author

The awkward bit here to figure out would be threading. Jetty's HTTP handlers run on its internal threads. We'll need a nice mechanism to send/receive fjåge messages from these threads.

A standalone REST Agent that adds a new Handler to the WebServer won't work, since the Handler will get called on the jetty threads, but it's not possible to send messages from those threads since sending messages is only allowed from the Agent's threads.

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

No branches or pull requests

1 participant