diff --git a/Docs/ExtensionRestActions.svg b/Docs/ExtensionRestActions.svg index 984ed330..4f9a2a4d 100644 --- a/Docs/ExtensionRestActions.svg +++ b/Docs/ExtensionRestActions.svg @@ -1 +1 @@ -%23%20File%20comapible%20with%20https%3A%2F%2Fsequencediagram.org%2F%0Atitle%20Extension%20Initialization%20and%20REST%20Request%2FResponse%20Sequence%0Aentryspacing%200.3%0Aparticipantgroup%20%23lightgreen%20**Extension%20Node**%0Aentity%20Extension%0Aparticipant%20%22Extensions%5CnRunner%22%20as%20ExtensionsRunner%0Aend%0Aparticipantgroup%20%23lightblue%20**OpenSearch%20Node**%0Aentity%20Node%0Aparticipant%20%22Extensions%5CnManager%22%20as%20ExtensionsManager%0Aparticipant%20%22RestActions%5CnRequestHandler%22%20as%20RestActionsRequestHandler%0Aactor%20User%0Aparticipant%20%22Rest%5CnController%22%20as%20RestController%0Aend%0Aparallel%0Anote%20over%20Extension%2CExtensionsRunner%3AExtension%20Startup%0Anote%20over%20Node%2CRestController%3AOpenSearch%20Node%20Startup%0Aparallel%20off%0Aparallel%0Aautonumber%201%0AExtension-%3E*ExtensionsRunner%3AExtensions%5CnRunner.run(this)%0Aautonumber%208%0ANode-%3E*RestController%3Anew%0Aparallel%20off%0Aautonumber%202%0AExtension%3C-ExtensionsRunner%3AgetExtension%5Cn%20%20%20%20%20Settings()%0AExtension--%3EExtensionsRunner%3Areturns%20settings%0Aspace%20-2.2%0Aparallel%0AExtensionsRunner-%3EExtensionsRunner%3A%20bind%20to%20host%3Aport%0Aautonumber%209%0ANode-%3E*ExtensionsManager%3Anew%0Aparallel%20off%0Aspace%20-2.2%0Adestroysilent%20Node%0Aspace%201.4%0Aautonumber%205%0AExtension%3C-ExtensionsRunner%3AgetExtension%5Cn%20%20%20%20%20RestHandlers()%0AExtension--%3EExtensionsRunner%3Areturns%20handlers%0Aspace%20-3.2%0Aparallel%0AExtensionsRunner-%3EExtensionsRunner%3Aput%20all%20handlers%5Cnin%20Extension%5CnRestPathRegistry%0Aautonumber%2010%0AExtensionsManager-%3E*RestActionsRequestHandler%3Anew%0Aparallel%20off%0Aspace%201%0Anote%20over%20ExtensionsRunner%2CRestController%3AInitialization%20and%20Registration%0Agroup%20for%20each%20extension%0AExtensionsRunner%3C-ExtensionsManager%3AInitializeExtensionRequest%0AExtensionsRunner--%3EExtensionsManager%3AInitializeExtensionResponse%0Adestroysilent%20ExtensionsManager%0AExtensionsRunner-%3EExtensionsRunner%3Aget%20all%20handlers%5Cnfrom%20Extension%5CnRestPathRegistry%0Aspace%20-1.5%0AExtensionsRunner-%3ERestActionsRequestHandler%3ARegisterRestActionsRequest%0Aspace%20-1.5%0ARestActionsRequestHandler-%3ERestController%3A%5C%2F%5C%2F%20map%20all%20routes%20to%20extension%5Cnregister(SendToExtensionAction)%0AExtensionsRunner%3C--RestActionsRequestHandler%3ARegisterRestActionsResponse%0Aspace%200%0Aend%0Aspace%201%0Anote%20over%20Extension%2CRestController%3ALater%2C%20a%20user%20sends%20a%20REST%20request%2C%20handled%20by%20RestController%0Acreate%20User%0AUser-%3ERestController%3AREST%20request%0Adestroysilent%20User%0ARestActionsRequestHandler%3C-RestController%3A%20%20%20%20%20invokes%20registered%5CnSendToExtensionAction%0AExtensionsRunner%3C-RestActionsRequestHandler%3ARestExecuteOnExtensionRequest%0AExtensionsRunner%3C-ExtensionsRunner%3Aget%20handler%5Cnfrom%20Extension%5CnRestPathRegistry%0Aspace%20-3.2%0AExtension%3C-ExtensionsRunner%3A(on%20mapped%20action)%5Cn%20%20handleRequest()%0Aspace%200%0Agroup%20as%20needed%0AExtension-%3ERestController%3AUse%20SDKClient%20for%20REST%20Actions%20on%20OpenSearch%20cluster%0AExtension%3C--RestController%3Aresponse%20to%20extension%0Aspace%200%0Aend%0AExtension--%3EExtensionsRunner%3Areturns%20response%0AExtensionsRunner--%3ERestActionsRequestHandler%3ARestExecuteOnExtensionResponse%0ARestActionsRequestHandler--%3ERestController%3A%20%20%20%20%20SendToExtensionAction%5Cnreturns%20BytesRestResponse%0ARestController-%3E*User%3Aresponse%0Adestroysilent%20User%0Aspace%20-3%0AExtension Initialization and REST Request/Response SequenceExtension NodeOpenSearch NodeExtensionNodeExtension StartupOpenSearch Node StartupExtensionsRunnerExtensions1 Runner.run(this)RestControllernew8 getExtension2 Settings()returns settings3 bind to host:port4 ExtensionsManagernew9 getExtension5 RestHandlers()returns handlers6 put all handlers7 in ExtensionRestPathRegistryRestActionsRequestHandlernew10 Initialization and RegistrationInitializeExtensionRequest11 InitializeExtensionResponse12 get all handlers13 from ExtensionRestPathRegistryRegisterRestActionsRequest14 // map all routes to extension15 register(SendToExtensionAction)RegisterRestActionsResponse16 Later, a user sends a REST request, handled by RestControllerUserREST request17 invokes registered18 SendToExtensionActionRestExecuteOnExtensionRequest19 get handler20 from ExtensionRestPathRegistry(on mapped action)21 handleRequest()Use SDKClient for REST Actions on OpenSearch cluster22 response to extension23 returns response24 RestExecuteOnExtensionResponse25 SendToExtensionAction26 returns BytesRestResponseUserresponse27 for each extensionas needed +%23%20File%20comapible%20with%20https%3A%2F%2Fsequencediagram.org%2F%0Atitle%20Extension%20Initialization%20and%20REST%20Request%2FResponse%20Sequence%0Aentryspacing%200.3%0Aparticipantgroup%20%23lightgreen%20**Extension%20Node**%0Aentity%20Extension%0Aparticipant%20%22Extensions%5CnRunner%22%20as%20ExtensionsRunner%0Aend%0Aparticipantgroup%20%23lightblue%20**OpenSearch%20Node**%0Aentity%20Node%0Aparticipant%20%22Extensions%5CnManager%22%20as%20ExtensionsManager%0Aparticipant%20%22RestActions%5CnRequestHandler%22%20as%20RestActionsRequestHandler%0Aactor%20User%0Aparticipant%20%22Rest%5CnController%22%20as%20RestController%0Aend%0Aparallel%0Anote%20over%20Extension%2CExtensionsRunner%3AExtension%20Startup%0Anote%20over%20Node%2CRestController%3AOpenSearch%20Node%20Startup%0Aparallel%20off%0Aparallel%0Aautonumber%201%0AExtension-%3E*ExtensionsRunner%3AExtensions%5CnRunner.run(this)%0Aautonumber%208%0ANode-%3E*RestController%3Anew%0Aparallel%20off%0Aautonumber%202%0AExtension%3C-ExtensionsRunner%3AgetExtension%5Cn%20%20%20%20%20Settings()%0AExtension--%3EExtensionsRunner%3Areturns%20settings%0Aspace%20-2.2%0Aparallel%0AExtensionsRunner-%3EExtensionsRunner%3A%20bind%20to%20host%3Aport%0Aautonumber%209%0ANode-%3E*ExtensionsManager%3Anew%0Aparallel%20off%0Aspace%20-2.2%0Adestroysilent%20Node%0Aspace%201.4%0Aautonumber%205%0AExtension%3C-ExtensionsRunner%3AgetExtension%5Cn%20%20%20%20%20RestHandlers()%0AExtension--%3EExtensionsRunner%3Areturns%20handlers%0Aspace%20-3.2%0Aparallel%0AExtensionsRunner-%3EExtensionsRunner%3Aput%20all%20handlers%5Cnin%20Extension%5CnRestPathRegistry%0Aautonumber%2010%0AExtensionsManager-%3E*RestActionsRequestHandler%3Anew%0Aparallel%20off%0Aspace%201%0Anote%20over%20ExtensionsRunner%2CRestController%3AInitialization%20and%20Registration%0Agroup%20for%20each%20extension%0AExtensionsRunner%3C-ExtensionsManager%3AInitializeExtensionRequest%0AExtensionsRunner--%3EExtensionsManager%3AInitializeExtensionResponse%0Adestroysilent%20ExtensionsManager%0AExtensionsRunner-%3EExtensionsRunner%3Aget%20all%20handlers%5Cnfrom%20Extension%5CnRestPathRegistry%0Aspace%20-1.5%0AExtensionsRunner-%3ERestActionsRequestHandler%3ARegisterRestActionsRequest%0Aspace%20-1.5%0ARestActionsRequestHandler-%3ERestController%3A%5C%2F%5C%2F%20map%20all%20routes%20to%20extension%5Cnregister(SendToExtensionAction)%0AExtensionsRunner%3C--RestActionsRequestHandler%3ARegisterRestActionsResponse%0Aspace%200%0Aend%0Aspace%201%0Anote%20over%20Extension%2CRestController%3ALater%2C%20a%20user%20sends%20a%20REST%20request%2C%20handled%20by%20RestController%0Acreate%20User%0AUser-%3ERestController%3AREST%20request%0Adestroysilent%20User%0ARestActionsRequestHandler%3C-RestController%3A%20%20%20%20%20invokes%20registered%5CnSendToExtensionAction%0AExtensionsRunner%3C-RestActionsRequestHandler%3AExtensionRestRequest%0AExtensionsRunner%3C-ExtensionsRunner%3Aget%20handler%5Cnfrom%20Extension%5CnRestPathRegistry%0Aspace%20-3.2%0AExtension%3C-ExtensionsRunner%3A(on%20mapped%20action)%5Cn%20%20handleRequest()%0Aspace%200%0Agroup%20as%20needed%0AExtension-%3ERestController%3AUse%20SDKClient%20for%20REST%20Actions%20on%20OpenSearch%20cluster%0AExtension%3C--RestController%3Aresponse%20to%20extension%0Aspace%200%0Aend%0AExtension--%3EExtensionsRunner%3Areturns%20response%0AExtensionsRunner--%3ERestActionsRequestHandler%3ARestExecuteOnExtensionResponse%0ARestActionsRequestHandler--%3ERestController%3A%20%20%20%20%20SendToExtensionAction%5Cnreturns%20BytesRestResponse%0ARestController-%3E*User%3Aresponse%0Adestroysilent%20User%0Aspace%20-3%0AExtension Initialization and REST Request/Response SequenceExtension NodeOpenSearch NodeExtensionNodeExtension StartupOpenSearch Node StartupExtensionsRunnerExtensions1 Runner.run(this)RestControllernew8 getExtension2 Settings()returns settings3 bind to host:port4 ExtensionsManagernew9 getExtension5 RestHandlers()returns handlers6 put all handlers7 in ExtensionRestPathRegistryRestActionsRequestHandlernew10 Initialization and RegistrationInitializeExtensionRequest11 InitializeExtensionResponse12 get all handlers13 from ExtensionRestPathRegistryRegisterRestActionsRequest14 // map all routes to extension15 register(SendToExtensionAction)RegisterRestActionsResponse16 Later, a user sends a REST request, handled by RestControllerUserREST request17 invokes registered18 SendToExtensionActionExtensionRestRequest19 get handler20 from ExtensionRestPathRegistry(on mapped action)21 handleRequest()Use SDKClient for REST Actions on OpenSearch cluster22 response to extension23 returns response24 RestExecuteOnExtensionResponse25 SendToExtensionAction26 returns BytesRestResponseUserresponse27 for each extensionas needed