Class GrpcMessageEnvironment

  • All Implemented Interfaces:
    MessageEnvironment

    public final class GrpcMessageEnvironment
    extends Object
    implements MessageEnvironment
    This class is installed when every node, containing both driver and evaluator, has been started, and setup grpc environment to implement RPC semantics defined in org.apache.nemo.runtime.common.message package. For each GrpcMessageEnvironment, there are a single GrpcMessageServer and multiple GrpcMessageClient, which are responsible for responding replies for messages from other clients, and for transferring messages to other servers, respectively.

    The GrpcMessageServer is started as soon as the environment is initialized, and registers the unique sender id of the local node to name server, which is used for id-based communication. The MessageListeners should be setup to correctly handle incoming messages.

    The GrpcMessageClients are created whenever there is a request to create a MessageSender, a component to issue RPC calls to other servers. Like the GrpcMessageServer registers its id to the name server, the GrpcMessageClient uses target receiver id to look up the name server to resolve the ip address of the target server before establishing a connection to the server.