-
Notifications
You must be signed in to change notification settings - Fork 0
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
agent: listen over a serial interface #5
Comments
We have define the following json format to communicate bewteen the vmm. {
"files": [
{
"filename": "src/index.js",
"content": "console.log('Hello World!');"
}
],
"script": ["node src/index.js"]
} |
This JSON is incorrect. You should implement the output directive as we defined on the lambdo configuration file. |
Sure, the payload should like the following : {
"files": [
{
"filename": "src/index.js",
"content": "console.log('Hello World!');"
}
],
"steps": [
{
"command": "node src/index.js",
"enableOutput": true
}
]
} For a step, there is two new fields :
The result can be use or not for the PolyCode validator |
We have defined with our team the protocol that shound be used to speak with the Each message should be delimited at the beginning and the end of the message with the character Between these delimliters, payload will be send through JSON. 3 types of message existed which are specified in the statusMessageWhen the AGENT starts, it send a For the ready message sending at startup {
"type": "statusMessage",
"status" : "OK"
} codeRequest{
"type": "codeRequest",
"data": {
"files": [
{
"filename": "src/index.js",
"content": "console.log('Hello World!');"
}
],
"steps": [
{
"command": "node src/index.js",
"enableOutput": true
}
]
}
} codeExecutionHere is the payload that is transmitted after a codeExecution. For each commands send, we return the whole result. We won't maniuplate the With enableOutput = false {
"type": "codeExecution",
"data": {
"steps": [
{
"command": "node src/index.js",
"result": 0,
"stdout": "",
"stderr": "",
"enableOutput": false
}
]
}
} With enableOutput = true {
"type": "codeExecution",
"data": {
"steps": [
{
"command": "node src/index.js",
"result": 0,
"stdout": "Hello World!",
"stderr": "",
"enableOutput": true
}
]
}
} 📓 The |
I understand that |
Why chosing |
A few comments:
|
Hello @sameo, we have read your remarks Concercing the last point, we didn't understand why we should have a |
Sorry for the delayed reply @Alexis-Bernard
You are right, this is the current scope, and cancelling a workload could be done that way. However, a frame |
@Maxtho8 We change a bit of fields, please think to update your code accordingly 😄 Okay, here are the final objects defining the communication protocol. We will use the SLIP protocol for transferring messages as suggested. Status of the agentThe first message send by the agent to the host will be the following JSON payload : {
"type": "status",
"code": "ready"
} Code requestThis message should be send by the Host to the Agent and request a code execution. An UUID should be provided to identity the workload through the id field. {
"type": "request",
"code": "run",
"data": {
"id": "4bf68974-c315-4c41-aee2-3dc2920e76e9",
"files": [
{
"filename": "src/index.js",
"content": "console.log('Hello World!');"
}
],
"steps": [
{
"command": "node src/index.js",
"enableOutput": true
}
]
}
} Enable output will only hide the stdout field Code response{
"type": "response",
"code": "run",
"data": {
"id": "4bf68974-c315-4c41-aee2-3dc2920e76e9",
"steps": [
{
"command": "node src/index.js",
"exitCode": 0,
"stdout": "",
"stderr": ""
}
]
}
} For each command, the following field will be returned:
|
@GridexX Good progress. One remaining question on the response frame: {
"type": "response",
"code": "run",
"data": {
"id": "4bf68974-c315-4c41-aee2-3dc2920e76e9",
"steps": [
{
"command": "node src/index.js",
"result": 0,
"stdout": "",
"stderr": "",
"enableOutput": false
}
]
}
} Are you planning to support providing a |
@sameo Thanks for the quick reply ! Yes, we plan to support providing a result and output for each step ! |
Hello, There was a communication problem because with the other teams we had decided not to use SLIP and delimiter. By default the system is waiting for a frame in this form : The first tram is RDY with a message size of 0 to tell to VMM that agent is ready and we can send code. There is 3 status code RDY , EXE and RES After VMM send the following frame : When the agent receive an EXE frame , he execute the code passed in the JSON message To finish, the VMM is waiting for the RES frame We had problems with the slip protocol what do you think of this alternative? |
Hello, After discussing with the agent team, we realized that we both had problems with SLIP lib. |
A few comments here:
Does this protocol define a frame delimiter? |
This is one of the first issue related to the agent.
For now we have defined the following tasks:
This is still an early proposal of the tasks to do. We need further exploring before truly having a grasp on what needs to be done. Please comment and discuss with us anything we missed or misunderstood, or if this does not look like a logical division of tasks.
The text was updated successfully, but these errors were encountered: