Replies: 8 comments 1 reply
-
Use cases to consider
Areas to address
|
Beta Was this translation helpful? Give feedback.
-
a few initial observations
There are other messages which are untested, in that we have no examples that use them from UI. e.g
Do we need both |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
What we agreed on
Next steps
Response type optionsGeneric error response & Request specific success response
Example of core api
Example of generic rpc
Single response message that can represent success or error result
Example of core api
Custom Rpc example
RPC context optionsWe can have more granular rpc messages that is specific to context (e.g. view port id or that + row id etc) or have a context as optional field |
Beta Was this translation helpful? Give feedback.
-
In the message below, I would prefer to locate the result as a sibling of the action, rather than nest the result inside the action. {
"requestId": "ip-qHiO3cKKYvVT1LL9ow",
"sessionId": "SESS-60d190dc-ff19-44e8-bdca-c989cfd2fff2",
"body": {
"type": "GET_TABLE_LIST"
}
}
{
"requestId": "ip-qHiO3cKKYvVT1LL9ow",
"sessionId": "SESS-60d190dc-ff19-44e8-bdca-c989cfd2fff2",
"body": {
"type": "RPC_RESPONSE",
"rpcName": "getTableList",
"isSuccess": true,
"result": {
"type": "RPC_SUCCESS_RESULT",
"action": {
"type": "DISPLAY_RESULT_ACTION",
"result" : {
"tables": ["table1", "table2"]
}
}
}
}
} |
Beta Was this translation helpful? Give feedback.
-
one of the minor things that annoys me is the definition of Table, which is
which means I end up with lots of code referring to
|
Beta Was this translation helpful? Give feedback.
-
Current working proposal Request {
"requestId": "REQ-3",
"sessionId": "SESS-5a407509-387b-4f97-b59b-c0a3efbb0e8d",
"token": "3afbe861-797e-4f38-a073-161bd544b25f",
"user": "testUser",
"body": {
"type": "RPC_REQUEST",
"context": {
"type": "VIEWPORT_CONTEXT",
"viewPortId": "testUser-VP-00000000"
},
"rpcName": "getUniqueFieldValues",
"params": {
"table": "TypeaheadTest",
"module": "TEST",
"column": "Account"
}
},
"module": "DoesntReallyMatter"
} Successful Response {
"requestId": "REQ-3",
"sessionId": "SESS-5a407509-387b-4f97-b59b-c0a3efbb0e8d",
"token": "3afbe861-797e-4f38-a073-161bd544b25f",
"user": "testUser",
"body": {
"type": "RPC_RESPONSE",
"rpcName": "getUniqueFieldValues",
"result": {
"type": "SUCCESS_RESULT",
"data": [
"12355",
"45321",
"89564"
]
},
"action": {
"type": "NO_ACTION"
}
},
"module": "CORE"
} Error Response {
"requestId": "REQ-1",
"sessionId": "SESS-0e3c83ce-38a5-4ce9-83b2-27a161d6d8b9",
"token": "55f2449c-d985-408d-bf37-068e309e4437",
"user": "testUser",
"body": {
"type": "RPC_RESPONSE",
"rpcName": "getUniqueFieldValues",
"result": {
"type": "ERROR_RESULT",
"errorMessage": "No viewport viewPortThatDoesNotExist found for RPC Call for getUniqueFieldValues"
},
"action": {
"type": "SHOW_NOTIFICATION_ACTION",
"notificationType": "Error",
"title": "Failed to process getUniqueFieldValues request",
"message": "No viewport viewPortThatDoesNotExist found for RPC Call for getUniqueFieldValues"
}
},
"module": "CORE"
} |
Beta Was this translation helpful? Give feedback.
-
Related to #1503 |
Beta Was this translation helpful? Give feedback.
-
Objective
Current
See Messages.scala and CoreJsonSerializationMixin.scala
or vuu-protocal-types\index.d.ts
Parent Message object
Message Body types
Authenticate
TO BE REMOVED
Login
Heartbeat
Heartbeat request is initiated from server, and client sends response
Get Table List
Get Table Meta
RCP
RPC Update
Viewport RCP
Viewport Menu RCP
Menu RPC
TO BE REMOVED
Viewport Edit RCP
Error
Create Viewport
Deleting Viewport
Change Viewport Content
Change Viewport Range
Set Selection
Expects indices of selected rows - what happen if index change?
Get Viewport Menu
Viewport Menu
Create Visual Link
Remove Visual Link
Get Visual Links
Enable Viewport
Disable Viewport
Open Tree Node
Close Tree Node
Type field
Beta Was this translation helpful? Give feedback.
All reactions