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
0
votes
1 answer

How to create sockjs (SockJS - WebSocket emulation) or Shoe standalone server (node.js)?

Does anyone know how to create sockjs-node (SockJS - WebSocket emulation) or Shoe standalone server? Is it possible to crate without http Server? Just need to exchange data with dnode, and static pages are not necessary. For instance, when I do on…
user1028880
0
votes
1 answer

The right way to call a service function on sails.js as soon as I start sails.js

I want that my sails.js application communicates with a php client. I've create a new dnode server service in sails.js for that. This service can start the dnode server. Currently I start the server with a controller by a request, but the server…
JumpLink
  • 487
  • 6
  • 13
0
votes
1 answer

dnode server->client direct call possible? node.js

I use dnode I have read StackOverflow: Send message from server to client with dnode and undersand dnode uses a symmetric protocol so either side can define functions that the opposing side can call. as @substack the author replied. So, right…
user1028880
0
votes
2 answers

dnode working along nodejs on windows 8 error

i have been trying to get dnode to install from this link http://bergie.iki.fi/blog/dnode-make_php_and_node-js_talk_to_each_other/ i tried npm install dnode i gave me the following error. gyp ERR! configure error gyp ERR! stack Error: Can't find…
mega-crazy
  • 838
  • 2
  • 17
  • 36
0
votes
1 answer

dnode over http with remotes from both ends

Can anyone think of why two way dnode wouldn't work when using it over HTTP ? Here is a working TCP…
jpillora
  • 5,194
  • 2
  • 44
  • 56
0
votes
2 answers

DNode server method timeout

We are looking to use NodeJs DNode (https://github.com/substack/dnode) in a project where we need RPC functionality. It has been setup and tested and seems a good fit for the project. One small niggle though. The remote functions can be user-defined…
MarkOfSine
  • 275
  • 3
  • 11
0
votes
1 answer

DNode implementation for websocket communication in node.js

I don't understand the way DNode uses websocket communication. Some say it uses socket.io others say sockjs. Which one is it? Or is it possible to choose? I'm trying to use DNode, but I also need access to the connections for (semi-)broadcasting in…
Kim
  • 57
  • 1
  • 7
1 2
3