title: RPC with promises for node.js
body: <p>Are there any RPC modules which work with promises?</p>
  
  <p>On the server I have functions which return promises. I would like to expose them for browser clients to call over websockts or fallbacks. I found some RPC libraries for example dnode, but they expect a callback as parameter.</p>
  
  <p>I would like something like this:</p>
  
  <p>Server:</p>
  
  <pre>
  rpc.expose({
      timeout: function (time) {
          var d = Q.defer();
          setTimeout(function () {
              d.resolve();
          }, time);
          return d.promise;
      }
  });
  </pre>
  
  <p>Client:</p>
  
  <pre>
  rpc.timeout(2000).then(function() {
      console.log('done');
  });
  </pre>