• +86-156-1535-0639
  • jianpengqi@126.com

DRPC(Distributed Remote Procedure Call)分布式远程调用

  • DataMiner

DRPC(Distributed Remote Procedure Call)分布式远程调用

DRPC Workflow

A client sends the DRPC server the name of the function to execute and the arguments to that function. The topology implementing that function uses a DRPCSpout to receive a function invocation stream from the DRPC server. Each function invocation is tagged with a unique id by the DRPC server. The topology then computes the result and at the end of the topology a bolt called ReturnResults connects to the DRPC server and gives it the result for the function invocation id. The DRPC server then uses the id to match up that result with which client is waiting, unblocks the waiting client, and sends it the result.

DRPC topologies type

DRPC usage

  1. Launching a DRPC server can be done with the storm script and is just like launching Nimbus or the UI:

    1
    bin/storm drpc
  2. Configuring this through the storm.yaml:

    1
    2
    3
    drpc.servers:
    - "drpc1.foo.com"
    - "drpc2.foo.com"
  3. Launching DRPC topologies using StormSubmitter:

    1
    2
    StormSubmitter.submitTopology("exclamation-drpc", conf,
    builder.createRemoteTopology());

See more in Apache Storm DRPC