Questions tagged [dnode]

DNode is an asynchronous object-oriented RPC system for node.js that lets you call remote functions.

(From the Readme at DNode on Github)

DNode works over network sockets and even in the browser with socket.io.

Plus, there are dnode implementations for perl, ruby, and java, so you can glue together all your backend processes swimmingly.

How it Works

When you throw an object at dnode, a recursive traversal scrubs out all of the function objects nested in your data structure and a secondary data structure is sent along with remote requests that creates shim functions that create RPC calls back to the side where the functions were originally defined.

When you call a remote function, the same recursive traversal trick happens to the arguments you pass along, so you can pass callbacks to your remote functions that actually call you back over the wire when the remote side calls the shim function on the other end.

Basically, dnode lets you call remote functions as if they were defined locally without using eval() or Function.prototype.toString().

The only catch is that because the function calls are traveling down the high-latency network, the return values of your functions are ignored. Use continuation-passing style instead!

More features:

  • symmetric design: both sides of the connection can host up methods for the other side to call

  • use tcp streams or websockets courtesy of socket.io! (see below, just throw a webserver at listen())

read more

37 questions
2
votes
0 answers

Remote calls using sockjs or dnode as possible replacements for nowjs

I am looking at alternatives for Nowjs, for making remote function calls from the client on a NODEJS server, and have stumbled upon dnode and sockjs as possible options. Can someone point out the difference and advantages of one over another, OR if…
anurag_29
  • 922
  • 10
  • 19
1
vote
0 answers

several doubts about node.js and php

In my case i'm making something like this :- http://sketchtoy.com/65641233 Not that website , i'm talking about the diagram. In my case i will have a page where a client can buy access to some service (done in node.js ). Each user buying service…
1
vote
1 answer

DNODE PHP Fatal error: Class 'React\EventLoop\StreamSelectLoop'

I am installing dnode-php from github repository. I am running PHP 5.3.10 and Composer. I used the composer.json file included in the above repository to generate my autoload.php files. When I go to run server.php I get the following message: PHP…
1
vote
1 answer

How would I use Socket.io on a dedicated node.js server on a php site?

For a web application coded in PHP, I am powering a lot of the functionality that would traditionally utilize AJAX, like real-time chat, with Socket.io. In order to use Websockets without straining Apache servers, I have servers running node.js…
TheEnvironmentalist
  • 2,694
  • 2
  • 19
  • 46
1
vote
1 answer

Remote interface exposed from both ends of a single upnode connection

So I know how to splice a dnode interface in from both ends of TCP connection - see my code here: client.js and server.js. Can you do this with upnode ?
jpillora
  • 5,194
  • 2
  • 44
  • 56
1
vote
1 answer

is dnode supported by heroku?

When I try to apply this simple node app at heroku, I got error: no port or path provided Here is the app: server.js var express = require("express"); var app = express(); app.use(express.logger()); app.get('/', function(request, response) { …
simo
  • 23,342
  • 38
  • 121
  • 218
1
vote
1 answer

Node.js Real-Time Stuff with DNode/shoe and all about load balancing

I have built a little system that uses dnode, shoe and browserify on the client, and NodeJS and dnode/shoe on the server end. I'm wondering if it is a good idea to use dnode (RPC) as the sole protocol for a real-time web application. Let's look at…
Sam
  • 6,414
  • 11
  • 46
  • 61
1
vote
2 answers

How to encrypt a dnode connection?

I am using dnode as an RPC-style library within my Node.js application. Now I would like to have secure dnode's connection using public-key-cryptography. I guess that this should be possible anyhow using Node.js' TLS module, but I have never used…
Golo Roden
  • 140,679
  • 96
  • 298
  • 425
1
vote
0 answers

dnode ruby hangs

I have a problem with dnode. I created a node.js server and from ruby I want to call some node function. It works, but the connection hangs. So I placed some console.log to the node.js function to debug the problem and I can see that the function is…
Jakub
  • 1,037
  • 8
  • 21
1
vote
2 answers

npm install dnode fail with node0.8.1 & win7

had try python 2.7.3 & 3.x, both fail. error2 with py2.7 E:\Workspace\Code\SmartDoor>python Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)] on win 32 Type "help", "copyright", "credits" or "license" for more…
atian25
  • 4,166
  • 8
  • 37
  • 60
1
vote
1 answer

dnode memory leak?

I want to test the performance of dnode, so I try to send a string from client to server, and server call back client with the same string. The memory usage of server always increasing, the server crashed after 691 calls. Was it my javascript code…
hengying
  • 21
  • 4
1
vote
1 answer

Socket hang in dnode

I have developed a client/server bi-directional communication using dnode. When a client connects to the server, I keep the connection so the server can use this connection to invoke a method on the client when it needs to. Sometimes the connection…
Luc
  • 16,604
  • 34
  • 121
  • 183
0
votes
0 answers

Node js Infinitive loop (setTimeout or setInterval)

Hi have some code dnode function with callback: const dnode = require('dnode'); const request = require('request'); const daemon = dnode.connect(45848); function requestInfo() { daemon.on('remote', (rpc) => { …
Beliaf
  • 577
  • 2
  • 8
  • 25
0
votes
0 answers

Using Dnode to pass Mongo query from Node.JS

I have a cloud of virtual servers: one running php, one running node.js, one running mongodb. Dnode has successfully passed messages between the php and node using this guide.
0
votes
1 answer

DNODE as a way to make Java call NodeJS functions?

On the dnode github page (https://github.com/substack/dnode) there is a subsection that says: dnode in other languages These libraries implement the dnode protocol too so you can make RPC calls between scripts written in different languages. And…
FranXh
  • 4,481
  • 20
  • 59
  • 78