Class GRPCServerLearner

All Implemented Interfaces:
LearnerGrpc.AsyncService, io.grpc.BindableService

public class GRPCServerLearner extends LearnerGrpc.LearnerImplBase
Instantiation of the GRPC-Learner class defined by the protobuf protocol.
  • Constructor Details

    • GRPCServerLearner

      public GRPCServerLearner()
  • Method Details

    • train

      public void train(LearnerOuterClass.DataPackage data, io.grpc.stub.StreamObserver<LearnerOuterClass.StatusMessage> responseObserver)
      Train a MealyMachine model 1. Read data 2. Transform Data to Words 3. Extract input Alphabet 4. Learn Model
      Parameters:
      data - GRPC DataPackage, rows are traces where entries are alternating inputs and outputs
      responseObserver - Interface to transmit status messages via the GRPC connection
    • predict

      public void predict(LearnerOuterClass.DataPackage data, io.grpc.stub.StreamObserver<LearnerOuterClass.Prediction> responseObserver)
      Predicts the final output of a trace 1. Read Data 2. Transform Data to Words 3. Compute Prediction
      Parameters:
      data - GRPC DataPackage, rows are traces where entries are alternating inputs and outputs
      responseObserver - Interface to transmit status messages via the GRPC connection
    • export

      public void export(LearnerOuterClass.Empty request, io.grpc.stub.StreamObserver<LearnerOuterClass.Empty> responseObserver)
      Exports the Java-object to a file TODO: this function will change and implement the learner's "save"-functionality
      Parameters:
      request - GRPC request token
      responseObserver - GRPC interface for a response