node-drpc
node-drpc copied to clipboard
Remote DRPC with LocalCluster
HI, I am facing a problem when I try to use node-drpc with my trident DRPC which is submitted on a LocalCluster. Is node-drpc able to use with a localCluster? The client.execute will block my node.js program a long time and at last return nothing, codes inside the callback function (some console.log for debugging) is unused neither. I tried to figure out where the problem is by testing several parts of my program:
- DRPC will responses to my Java DRPCClient calling and my LocalDRPC calling
- I change the hostname to an unreachable address in the drpcClient = new NodeDRPCClient(hostname,port,timeout) part, and execute the drpc calling, and there is no response as before, after blocking a long time, it will return with nothing. Is that a correct reaction in time-out situation? Or I just doing some incorrect configuration and make it unusable?
This is my node.js code:
var NodeDRPCClient = require('node-drpc');
var timeout = 1;
var nodeDrpcClient = new NodeDRPCClient("192.168.0.135",3772,timeout);
nodeDrpcClient.execute("imageMatching",JSON.stringify("test"),function(err,res){
console.log("i am in!")
if(err)
console.err("wrong");
});
console.log("hungry");