1

Instead of creating every websocket and defining the entire structure by hand, is there a library that will let me run a function on the Node.js server, that can call a related function on all clients connected to the server simultaneously? Likewise, can I securely call a server function FROM the client browser? I feel like every time I have to construct a command to send over the web socket, I'm working on the transmission layer instead of the application layer, and I want to be thinking at the higher layer the entire time.

I wouldn't mind building something like this myself if it doesn't already exist, but I have a hard time believing this isn't solved on node already.

kanaka
  • 70,845
  • 23
  • 144
  • 140
Clinton
  • 2,296
  • 4
  • 19
  • 21

3 Answers3

3

What you are really looking for is an node.js RPC solution. Here are a couple of node.js RPC options:

I have not personally used them, but they look like they have good potential.

kanaka
  • 70,845
  • 23
  • 144
  • 140
  • 2
    Excellent comparison of DNode and NowJS http://stackoverflow.com/questions/5317282/what-is-the-difference-between-dnode-and-nowjs – mak Apr 28 '11 at 15:37
2

Try to look at now.js.

yojimbo87
  • 65,684
  • 25
  • 123
  • 131
0

Try msg-rpc, it just provides the rpc support you need, also no particular requirement for the websocket library of server/client you already have. Tell how to send out a message and forward the messages received, that's all.

Andrew
  • 5,290
  • 1
  • 19
  • 22