RESTful api to mars-sim #473
bevans2000
started this conversation in
Ideas
Replies: 2 comments 1 reply
-
@mokun I forget to tag you on this idea. |
Beta Was this translation helpful? Give feedback.
0 replies
-
So can you also list out any particular near-term use cases or applications for connecting to multiple clients ? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
One direction to consider for the future is converting the core engine into a remote service deployed on the net that can be shared by multiple parallel clients.
To do this the obvious way is to create a RESTful API that can delivery the properties of Simulation units/Entities to a remote client. We have something basic by allowing the Console interface to be used on a remote SSH connection. But this is for human users and not client software, e.g. mobile or separate web site.
We need an API that can deliver JSON representations of the entities. This is not the same as the internal representation that maybe used to persistent objects.
One way we could do this is to look at expanding the currently Console Command framework. Mot commands use the
StructuredResponse
to format output in a structured manner to the user. However we could provide a different implementation that present the data as JSON instead of text. The Commands would then provide the binding between the remote clients and the simulation internals.Beta Was this translation helpful? Give feedback.
All reactions