Skip to content

Federated Solving Payloads

GearsAD edited this page Mar 21, 2019 · 3 revisions

This is the preliminary sequence for state management of federated solves:

//INIT
{
    "Id": "GUID",
    "EnvironmentId": "",
    "multisessionSolverId": "",
    "step": "INIT",
    "sessions": [
        {
            "userId":"",
            "robotId":"",
            "sessionId": "",
            "status": "",
            "resultDebug": ""
        },
        {
            "userId":"",
            "robotId":"",
            "sessionId": "",
            "status": "",
            "resultDebug": ""
        },
    ]
}
//BUILDINGPRIMES
{
    "Id": "GUID",
    "EnvironmentId": "",
    "step": "BUILDINGPRIMES",
    "sessions": [
        {
            "userId":"",
            "robotId":"",
            "sessionId": "",
            "status": ""
        },
        {
            "userId":"",
            "robotId":"",
            "sessionId": ""
            "status": ""
        },
    ]
}
//INDIVIDUALSOLVES
{
    "Id": "GUID",
    "EnvironmentId": "",
    "step": "INDIVIDUALSOLVES",
    "sessions": [
        {
            "userId":"",
            "robotId":"",
            "sessionId": "",
            "primeVariables": ["l0", "l1", "l2"]
            "status": "WAITING"
        },
        {
            "userId":"",
            "robotId":"",
            "sessionId": "",
            "primeVariables": ["l1", "l2"]
            "status": "WAITING"
        },
    ]
}
  • Push individual solves

// When individual solves complete, they each update status....

//INDIVIDUALSOLVES
{
    "Id": "GUID",
    "EnvironmentId": "",
    "step": "INDIVIDUALSOLVES",
    "sessions": [
        {
            "userId":"",
            "robotId":"",
            "sessionId": "",
            "status": "COMPLETE"
        },
        {
            "userId":"",
            "robotId":"",
            "sessionId": "",
            "status": "COMPLETE"
        },
    ]
}
//If individual fails, then we need to trigger somehow
{
    "Id": "GUID",
    "EnvironmentId": "",
    "step": "INDIVIDUALSOLVES",
    "sessions": [
        {
            "userId":"",
            "robotId":"",
            "sessionId": "",
            "status": "COMPLETE"
        },
        {
            "userId":"",
            "robotId":"",
            "sessionId": "",
            "status": "ERROR"
        },
    ]
}

// All solved - propagate back to primes

{
    "Id": "GUID",
    "EnvironmentId": "",
    "step": "CONSENSUS",
    "sessions": [
        {
            "userId":"",
            "robotId":"",
            "sessionId": "",
            "status": "COMPLETE"
        },
        {
            "userId":"",
            "robotId":"",
            "sessionId": "",
            "status": "COMPLETE"
        },
    ]
}

// Complete

{
    "Id": "GUID",
    "EnvironmentId": "",
    "step": "FINISHED",
    "sessions": [
        {
            "userId":"",
            "robotId":"",
            "sessionId": "",
            "status": "COMPLETE"
        },
        {
            "userId":"",
            "robotId":"",
            "sessionId": "",
            "status": "COMPLETE"
        },
    ]
}