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

Adds ktor+netty-based API #17

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Adds ktor+netty-based API #17

wants to merge 1 commit into from

Conversation

jrddunbr
Copy link
Contributor

This is a WIP to add a Ktor + Netty API to libage.

Ideally, it would have a few different API endpoints such as:

  • / - get basic information about the API, perhaps version info for libage
  • /circuits.json
  • /circuit/add - add a circuit
  • /circuit/step - step a circuit (possibly with some more information in the request such as a number of steps/time of steps)
  • /circuit/fetch - get circuit solve values
  • /circuit/delete - delete a circuit
  • Some kind of editing API for a circuit. This would require being able to modify connectivity as well. Perhaps for a later version?

The actual format is not set in stone yet, but there's some ideas floating around. I want to be able to use this from within code primarily, so knowing if there are logical errors and such for error handling would be helpful. eg, singular matrices, invalid connectivity, etc. I also currently catch sim side errors and throw those back with a stack trace but we could disable that for production unless debugging is enabled.

@jrddunbr jrddunbr added enhancement New feature or request help wanted Extra attention is needed labels Jun 27, 2022
@jrddunbr jrddunbr requested a review from Grissess June 27, 2022 02:16
@jrddunbr jrddunbr self-assigned this Jun 27, 2022
@jrddunbr jrddunbr requested a review from bloxgate June 27, 2022 02:16

val circuits = mutableMapOf<UUID, CircuitBundle>()

fun loadTestCircuits() {
Copy link
Contributor Author

@jrddunbr jrddunbr Jun 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just the first test from the MNATests.kt file. It doesn't need to be added, it's here for debugging.

@jrddunbr
Copy link
Contributor Author

I'm challenging @empireu or @Grissess to make this API work with the new API's in Eln2 if they get moved to libage. I doubt I'll be implementing this at this point.

@jrddunbr jrddunbr removed their assignment Feb 26, 2023
@jrddunbr jrddunbr marked this pull request as draft February 26, 2023 05:51
@jrddunbr jrddunbr changed the title [wip] Adds ktor+netty-based API Adds ktor+netty-based API Feb 26, 2023
@jrddunbr jrddunbr added the wip label Feb 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed wip
Projects
Development

Successfully merging this pull request may close these issues.

1 participant