You can't get the callback functionality without

1. Long polling
2. WebSockets

You need to do one on the two if you want the server to call back the
client.

NowJs or DNode is what I would recommend

Sent from my Windows Phone
------------------------------
From: Alan Hoffmeister
Sent: 4/11/2012 8:17 AM
To: nodejs@googlegroups.com
Subject: [nodejs] Re: Any good rest module?

Yep I could use it, but keep a persistent connection for every visitor will
consume a lot more resources from the server then a restfull service.

Em quarta-feira, 11 de abril de 2012, Matt escreveu:

> Looks like you want socket.io
>
> Matt.
>
>
> On Wed, Apr 11, 2012 at 10:58 AM, Alan Hoffmeister <
> alanhoffmeis...@gmail.com <javascript:_e({}, 'cvml',
> 'alanhoffmeis...@gmail.com');>> wrote:
>
>> I was thinking about something like this on the server side:
>>
>> rest-module.on('hello', function(req, res, data){
>>     res.send('Hello ' + data.world);
>> });
>>
>> And on the client side:
>>
>> $('#button').click(function(){
>>     var data = { world : 'world' };
>>     rest-module.emit('hello', data, function(res){
>>         console.log(res);
>>     });
>> });
>>
>> Is there anything like that already? Tried node-restify, but that's not
>> quite simple as I wished.
>>
>> Thank's!
>>
>>
>> --
>> --
>> Att,
>> Alan Hoffmeister
>>
>> --
>> Job Board: http://jobs.nodejs.org/
>> Posting guidelines:
>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>> You received this message because you are subscribed to the Google
>> Groups "nodejs" group.
>> To post to this group, send email to 
>> nodejs@googlegroups.com<javascript:_e({}, 'cvml', 
>> 'nodejs@googlegroups.com');>
>> To unsubscribe from this group, send email to
>> nodejs+unsubscr...@googlegroups.com <javascript:_e({}, 'cvml',
>> 'nodejs%2bunsubscr...@googlegroups.com');>
>> For more options, visit this group at
>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>
>
>  --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to 
> nodejs@googlegroups.com<javascript:_e({}, 'cvml', 'nodejs@googlegroups.com');>
> To unsubscribe from this group, send email to
> nodejs+unsubscr...@googlegroups.com <javascript:_e({}, 'cvml',
> 'nodejs%2bunsubscr...@googlegroups.com');>
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>


-- 
--
Att,
Alan Hoffmeister

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to