[nodejs] Re: Any good rest module?

2012-04-11 Thread Alan Hoffmeister
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

[nodejs] Re: Any good rest module?

2012-04-12 Thread Stephen Sugden
Lazorse (http://github.com/BetSmartMedia/Lazorse) is also close to doing what you want (disclaimer, I wrote it). It's missing a solid in- browser client, but the existing node client could be adapted to use jQuery instead of nodes http module without a lot of fuss. Your example would become someth

[nodejs] Re: Any good rest module?

2012-04-12 Thread Stephen Sugden
whoops, typo on the first line, should be require('lazorse').connect(), more details on the available constructors in the docs. -Stephen On Apr 12, 10:35 am, Stephen Sugden wrote: > Lazorse (http://github.com/BetSmartMedia/Lazorse) is also close to > doing what you want (disclaimer, I wrote it).

[nodejs] Re: Any good rest module?

2012-04-12 Thread Alexey Petrushin
What You described is not REST. You described some sort of bi-directional RPC, and there are many such tools for Node - as said before socket.io for example. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You recei

[nodejs] Re: Any good rest module?

2012-05-31 Thread tjholowaychuk
raw socket.io is more than enough IMHO On Apr 11, 7:58 am, Alan Hoffmeister 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

[nodejs] Re: Any good rest module?

2012-05-31 Thread Alexey Petrushin
> What Alan is describing could be done with just http Yes, I believe You are right, it doesn't require socked support and can be done with standard http, I looked at code too quickly and misunderstood it. But it seems there's nothing complicated there - on the client just serialize data to JSON

Re: [nodejs] Re: Any good rest module?

2012-04-11 Thread Matt
On Wed, Apr 11, 2012 at 11:16 AM, Alan Hoffmeister < alanhoffmeis...@gmail.com> wrote: > 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. a) That's why you're using Node - it copes with massive con

RE: [nodejs] Re: Any good rest module?

2012-04-11 Thread Glenn Block
/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

Re: [nodejs] Re: Any good rest module?

2012-05-31 Thread David Björklund
What Alan is describing could be done with just http - the client is sending a message that the server responds to. Socket.io etc is great when you want to send data from the server to the client, but that's not what Alan describes. With that being said, I don't know any module that have the funct

Re: [nodejs] Re: Any good rest module?

2012-05-31 Thread Alan Hoffmeister
Well, I'm implementing one endpoint that can handle RPC-like requestest, I'll up that package to npm when finished :) -- Att, Alan Hoffmeister 2012/5/31 David Björklund > What Alan is describing could be done with just http - the client is > sending a message that the server responds to. > Soc

Re: [nodejs] Re: Any good rest module?

2012-05-31 Thread Alan Hoffmeister
I wish I could say: "Let's rock'n websockets!", but I had bad experiences using socket.io behind firewalls.. That's why I'm fallbacking to RPC... -- Att, Alan Hoffmeister 2012/5/31 tjholowaychuk > raw socket.io is more than enough IMHO > > On Apr 11, 7:58 am, Alan Hoffmeister > wrote: > > I w

Re: [nodejs] Re: Any good rest module?

2012-05-31 Thread Dan Shaw
Socket.io 1.0 is going to directly address that limitation. Instead of trying to establish the best possible connection first, it will start with the most reliable connection and upgrade to websockets if it can. Daniel Shaw @dshaw On Thu, May 31, 2012 at 11:33 AM, Alan Hoffmeister wrote: > I wi

Re: [nodejs] Re: Any good rest module?

2012-05-31 Thread Alan Hoffmeister
@Alexey, this is what I'm doing ;) @Dan Shaw I hope so, it would be much more easy and secure for production. -- Att, Alan Hoffmeister 2012/5/31 Alexey Petrushin > > What Alan is describing could be done with just http > Yes, I believe You are right, it doesn't require socked support and can b