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: [email protected]
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 <
> [email protected] <javascript:_e({}, 'cvml',
> '[email protected]');>> 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 
>> [email protected]<javascript:_e({}, 'cvml', 
>> '[email protected]');>
>> To unsubscribe from this group, send email to
>> [email protected] <javascript:_e({}, 'cvml',
>> 'nodejs%[email protected]');>
>> 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 
> [email protected]<javascript:_e({}, 'cvml', '[email protected]');>
> To unsubscribe from this group, send email to
> [email protected] <javascript:_e({}, 'cvml',
> 'nodejs%[email protected]');>
> 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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to