Re: [nodejs] about net socket.write data to specify client

2013-03-19 Thread Danilo Luiz Rheinheimer Danilo
You can save the sockets on a data structure to later be able to use them. The most simple would be a simple array where you push the socket. To a simple example look at : https://gist.github.com/creationix/707146 Danilo. On Mon, Mar 18, 2013 at 11:50 PM, fivew...@gmail.com wrote: var net =

Re: [nodejs] Node.js VS Scala VS Clojure: what for an API with a we-love-java-we-dont-even-know-why business component in the company?

2013-02-27 Thread Danilo Luiz Rheinheimer Danilo
Playing devil's advocate. If you need to go to the java route Netty (http://netty.io/) is a good framework. It is asynchronous and event-driven too. It has some very usefull handlers like HttpRequest and HttpResponse to parse and output http connections data. I already did a http proxy

[nodejs] Process mongodb records

2013-02-07 Thread Danilo Luiz Rheinheimer Danilo
Hi, I have a node.js web application where I need process some mongodb records (something like 20k records). For each record I will do some processing and then write it back to the database. My code looks like this (not valid code just the idea) : db.mycol.find({}, function(err,

[nodejs] Remove diacritic from text

2013-01-14 Thread Danilo Luiz Rheinheimer Danilo
Hi, Someone is aware os a funcion to remove diacritics (accebts) from words on node.js string. In fact what I want is to replace the char with the diacritic with his version without the diacritic. If I have a string like : Imóvel I want the funcion result to be : Imovel Danilo.

Re: [nodejs] node + raspi + Internet of Things (IoT)

2013-01-11 Thread Danilo Luiz Rheinheimer Danilo
Hi. I know beaglebone has node and local c9 installed : http://www.youtube.com/watch?feature=player_embeddedv=8qME7_Eza54 But beaglebone is more powerfull than a raspberry pi I think. This project has a arduino like interface for node.js : https://github.com/jadonk/bonescript