Databases Reference
In-Depth Information
The topology name must be unique.
To install the Storm Client, see Appendix A .
DRPC Topologies
There is a special type of topology known as Distributed Remote Procedure Call
(DRPC) , that executes Remote Procedure Calls (RPC) using the distributed power of
Storm (see Figure 3-1 ). Storm gives you some tools to enable the use of DRPC. The first
is a DRPC server that runs as a connector between the client and the Storm topology,
running as a source for the toplogy spouts. It receives a function to execute and its
parameters. Then for each piece of data on which the function operates, the server
assigns a request ID used through the topology to identify the RPC request. When the
topology executes the last bolt, it must emit the RPC request ID and the result, allowing
the DRPC server to return the result to the correct client.
A single DRPC server can execute many functions. Each function is
identified by a unique name.
The second tool that Storm provides (used in the example) is the LinearDRPCTopology
Builder , an abstraction to help build DRPC topologies. The topology generated creates
DRPCSpouts —which connect to DRPC servers and emit data to the rest of the topology
—and wraps bolts so that a result is returned from the last bolt. All bolts added to a
LinearDRPCTopologyBuilder are executed in sequential order.
As an example of this type of topology, you'll create a process that adds numbers. This
is a simple example, but the concept could be extended to perform complex distributed
math operations.
 
Search WWH ::




Custom Search