hansken_extraction_plugin.framework.ExtractionPluginService.proto Maven / Gradle / Ivy
syntax = "proto3";
// UPDATE NOTICE
//
// If you make changes to the proto definitions (add, update, delete)s, please
// also update VersionUitl.java and apiversion.properties as described in the
// projects README.md
package org.hansken.extraction.plugin.grpc;
option java_multiple_files = true;
option java_package = "org.hansken.extraction.plugin.grpc";
import "google/protobuf/any.proto";
import "google/protobuf/empty.proto";
import "hansken_extraction_plugin/framework/DataMessages.proto";
/*
The following PlantUML diagram describes the lifecycle of a Extraction Plugin.
Notes:
* An extraction plugin runs as a server,
* An extraction plugin initializes itself standalone when started,
* Extraction plugins can handle requests in parallel (from multiple extraction
subprocesses),
* The messages shown in the diagram are pseudo-names. The actual
implementation uses different message names.
* `process()` opens a bi-directional communication stream between the client.
Messages are sent over this channel, denoted in the graph with a different
arrow style (->>, and <<-),
* `process()` is automatically scoped to process a single trace,
* The extraction plugin can handle multiple `process()` calls concurrently.
* A special start message is added that sends the Trace to be processed from
Hansken to the plugin. This message can not be passed as process() argument,
since gRPC methods only accept one argument, in this case a message stream.
@startuml
autonumber
collections Hansken
participant ExtractionPlugin
group Initialization
ExtractionPlugin -> ExtractionPlugin: setup(config)
Hansken -> ExtractionPlugin : pluginInfo()
Hansken <-- ExtractionPlugin : PluginInfo
end
group Process a Trace
Hansken -> ExtractionPlugin : process()
' messages on communication the stream
Hansken ->> ExtractionPlugin : start(Trace, ...)
Hansken <<- ExtractionPlugin : request(..)
Hansken -->> ExtractionPlugin : response
Hansken <<- ExtractionPlugin : action(...)
alt
Hansken <<-- ExtractionPlugin : finish()
else exception
Hansken <<-- ExtractionPlugin : partialFinishWithError(...)
end
end
@enduml
*/
/**
* ExtractionPlugin service definition, that is implemented by the extraction
* plugin server.
*/
service ExtractionPluginService {
/**
* Returns Extraction Plugin information, that is, a full description of the
* extraction plugin, and it expected input and outputs.
*/
rpc pluginInfo (google.protobuf.Empty) returns (RpcPluginInfo);
/**
* Request from client to server to start processing a trace.
* A trace is fully processed within the scope of this method.
*
* This request opens a bi-directional communication stream between
* client and server. All calls required for processing a trace are
* handled as messages on this channel.
*
* First message should be a Start-message from client to server.
* The last message should be a Finish-message from server to client.
*/
rpc process (stream google.protobuf.Any) returns (stream google.protobuf.Any);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy