DRPC
Distributed Remote Produce Call (DRPC). It is computing very intense functionality on the fly using storm. It gives input as function name and corresponding arguments and the output is results for each of those function calls.
Code example DRPC client:
DRPCClient client = new DRPCClient("drpc.server.location", 3772); System.out.println(client.execute("words", "cat dog the man");
DRPC Storm code:
topology.newDRPCStream("words") .each(new Fields("args"), new Split(), new Fields("word")) .groupBy(new Fields("word")) .stateQuery(wordCounts, new Fields("word"), new MapGet(), new Fields("count")) .aggregate(new Fields("count"), new Sum(), new Fields("sum"));
The program is explained in the following diagram: