[nodejs] Is nodejs good to be a video live broadcast server?

2012-06-12 Thread jason .
I want to make a video live broadcast server, I don't know how to make one,
and I don't if nodejs is good to do this thing, I hope guys could give me
some suggestion.

-- 
Best regards,

桂林 (Gui Lin)

guileen@twitter 
桂糊涂@weibo 
guileen@github 

-- 
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


Re: [nodejs] Is nodejs good to be a video live broadcast server?

2012-06-12 Thread jason .
Hi darren, what should I know for streams.

What is  "Microsoft MMSH video streams", What should I know for flash video
stream and html video stream up/down, and how IOS/android works for video
stream.

2012/6/13 darren 

> You might find this interesting: https://github.com/orospakr/stream-pump/
>
>
> On Tuesday, June 12, 2012 11:33:50 PM UTC-4, Jason.桂林(Gui Lin) wrote:
>>
>> I want to make a video live broadcast server, I don't know how to make
>> one, and I don't if nodejs is good to do this thing, I hope guys could give
>> me some suggestion.
>>
>> --
>> Best regards,
>>
>> 桂林 (Gui Lin)
>>
>> guileen@twitter <https://twitter.com/#%21/guileen>
>> 桂糊涂@weibo <http://weibo.com/guileen>
>> guileen@github <https://github.com/guileen>
>>
>>  --
> 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
>



-- 
Best regards,

桂林 (Gui Lin)

guileen@twitter <https://twitter.com/#!/guileen>
桂糊涂@weibo <http://weibo.com/guileen>
guileen@github <https://github.com/guileen>

-- 
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


[nodejs] res.setHeader is so slow

2012-06-15 Thread jason .
I found 
writeHead
is
much faster if there is no
setHeader
 before.


-- 
Best regards,

桂林 (Gui Lin)

guileen@twitter 
桂糊涂@weibo 
guileen@github 

-- 
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


[nodejs] Any good tool can generate REST API document?

2012-06-18 Thread jason .
Hi guys,

Any good tool can generate REST API document?

-- 
Best regards,

桂林 (Gui Lin)

guileen@twitter 
桂糊涂@weibo 
guileen@github 

-- 
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


[nodejs] prevent timeout when uncaughtException

2012-08-15 Thread jason .
To prevent server halt on error, listen the
`process.on('uncaughtException')`, but the response will timeout.

How to fix this problem, will these timeout req/res make memory leak ?

-- 
Best regards,

桂林 (Gui Lin)

guileen@twitter 
桂糊涂@weibo 
guileen@github 

-- 
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


[nodejs] nodejs memcached client

2012-08-21 Thread jason .
I am looking for a good memcached client.

node-memcached  https://github.com/3rd-Eden/node-memcached
node-memcachehttps://github.com/elbart/node-memcache

The `node-memcached` has a big bug of  'All the connections in the
memcached pool are busy'

The `node-memcache` cant reconnect the memcache, if memcache service
restarted.

Any other good options?

--
Best regards,

桂林 (Gui Lin)

guileen@twitter
桂糊涂@weibo
guileen@github

-- 
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


[nodejs] It is hard to debug timeout problem

2012-08-22 Thread jason .
The most difficult to me now is how to debug timeout issue, a very complex
logic which many async IO, can't find out where timeout.

-- 
Best regards,

桂林 (Gui Lin)

guileen@twitter 
桂糊涂@weibo 
guileen@github 

-- 
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


Re: [nodejs] It is hard to debug timeout problem

2012-08-22 Thread jason .
Node js log is totally non-sequence, it is a big problem.

2012/8/23 jason.桂林 

> The most difficult to me now is how to debug timeout issue, a very complex
> logic which many async IO, can't find out where timeout.
>
> --
> Best regards,
>
> 桂林 (Gui Lin)
>
> guileen@twitter <https://twitter.com/#!/guileen>
> 桂糊涂@weibo <http://weibo.com/guileen>
> guileen@github <https://github.com/guileen>
>
>


-- 
Best regards,

桂林 (Gui Lin)

guileen@twitter <https://twitter.com/#!/guileen>
桂糊涂@weibo <http://weibo.com/guileen>
guileen@github <https://github.com/guileen>

-- 
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


[nodejs] node.js response time increase with concurrent connections

2012-08-22 Thread jason .
test by node.js http helloworld

10 concurrent connections
response: 0ms(min) 19ms(max) 1ms(avg)

30 concurrent connections
response: 2ms(min) 20ms(max) 4ms(avg)

100 concurrent connections
response: 7ms(min) 43ms(max) 15ms(avg)

1000 concurrent connections
response: 6ms(min) 212ms(max) 167ms(avg)

We can see that, node.js response time increased with concurrent
connections, any one can explain this?

And how to avoid this problem, and if it is not http but tcp, will it be an
critical issue for multi player online game server, there will be many
concurrent connections.

-- 
Best regards,

桂林 (Gui Lin)

guileen@twitter 
桂糊涂@weibo 
guileen@github 

-- 
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


Re: [nodejs] It is hard to debug timeout problem

2012-08-23 Thread jason .
I just want to know if any one have same trouble with me?

2012/8/23 Karl Tiedt 

> If you are looking for help, your "big problem" is not providing any
> means of being helped... provide a broken code snippet... a gist... or
> a link to a git repo that contains the bad code... Something tangible
> that relates to your problem.
>
> http://www.catb.org/esr/faqs/smart-questions.html may help you in that
> endeavor.
>
> -Karl Tiedt
>
> --
> 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
>



-- 
Best regards,

桂林 (Gui Lin)

guileen@twitter 
桂糊涂@weibo 
guileen@github 

-- 
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


[nodejs] Looking for a good xml parser in stream mode

2012-08-29 Thread jason .
A protocol using xml, socket stream

first time I recieve
blabl

3rd time I recieve
ablabla , and left https://twitter.com/#!/guileen>
桂糊涂@weibo 
guileen@github 

-- 
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


[nodejs] How cluster master pass data to workers ondata listener

2012-08-30 Thread jason .
Hi guys, I need your help

As how node cluster module works, the workers works like normal Socket
Server, also it can listen to a public port, and handle the data client
pass it.

I have couple question about cluster.

1. listening
The master process listen at the public port, but what those workers with
the code `listen(port)` does? did the worker listen at somewhere, or it
just a fake listen?

2. receive data

If I am not misunderstanding, the data from client is send to the master
process, and the master process send an internalMessage like
worker.send(data), if so, the worker should handle data at
process.on('message',..) but not socket.on('data', ...), so we have to
change our workers code not like what cluster module did.

I notice there is a method called cluster._getServer, which would give the
worker a `handle` object which set to `socket._handle`.

3. send data back to client

When send to client, the worker process should send data to master process,
we need call `process.send` to the master process, and the master send data
back to client.

I know few thing about multi-process binding on a same port.

-- 
Best regards,

桂林 (Gui Lin)

guileen@twitter 
桂糊涂@weibo 
guileen@github 

-- 
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


Re: [nodejs] How cluster master pass data to workers ondata listener

2012-08-30 Thread jason .
nice to meet you too.

all workers listen to the same address, why no problem like "address
already bind".

why i care about how it works because the i need dispatch connection to
workers manually, and the connections need communication, you know like a
chat server, A send message to B but they are not on the same process.
在 2012-8-30 晚上11:34,"ribao wei" 写道:

> Hi 桂林:
>
> Nice to see a Chinese in the maillist.
>
> From what I read, children processes do I/O directly, not through the
> master.
>
> Ribao Wei
>
> On Thu, Aug 30, 2012 at 9:58 AM, jason.桂林  wrote:
>
>> Hi guys, I need your help
>>
>> As how node cluster module works, the workers works like normal Socket
>> Server, also it can listen to a public port, and handle the data client
>> pass it.
>>
>> I have couple question about cluster.
>>
>> 1. listening
>> The master process listen at the public port, but what those workers with
>> the code `listen(port)` does? did the worker listen at somewhere, or it
>> just a fake listen?
>>
>> 2. receive data
>>
>> If I am not misunderstanding, the data from client is send to the master
>> process, and the master process send an internalMessage like
>> worker.send(data), if so, the worker should handle data at
>> process.on('message',..) but not socket.on('data', ...), so we have to
>> change our workers code not like what cluster module did.
>>
>> I notice there is a method called cluster._getServer, which would give
>> the worker a `handle` object which set to `socket._handle`.
>>
>> 3. send data back to client
>>
>> When send to client, the worker process should send data to master
>> process, we need call `process.send` to the master process, and the master
>> send data back to client.
>>
>> I know few thing about multi-process binding on a same port.
>>
>> --
>> Best regards,
>>
>> 桂林 (Gui Lin)
>>
>> guileen@twitter <https://twitter.com/#!/guileen>
>> 桂糊涂@weibo <http://weibo.com/guileen>
>> guileen@github <https://github.com/guileen>
>>
>>  --
>> 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
>

-- 
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


[nodejs] How to handle the connection error of mongodb and redis

2012-02-29 Thread jason .
Hi guys.

My node server holds a mongodb connection and redisClient, mongodb has an
auto_reconnect option, but redis not.

If the redis service halted, or restarted, or the network problem occur,
how to make the node service stable?

Shall I auto reconnect to redis, or shall I restart my node service to do
all initial things again?

-- 
Best regards,

Jason Green
桂林

-- 
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


[nodejs] why this code memory leak

2012-02-29 Thread jason .
If you run below code, and restart you redis server, you will got one or
two uncaughtException, but no more errors any more, and then, the memory
will growing very fast, I want to know why

123456789101112131415161718192021

/**
 * This code will memory leak, if you restart redis server when the
node process is running
 *
 * @author Gui Lin
 */
var redis = require('redis').createClient();

setInterval(function(){

  redis.multi()
.zrangebyscore('timeup', 0, Date.now())
.zremrangebyscore('timeup', 0, Date.now())
.exec(function(err, data) {
  if(err) console.log(err.stack);
  if(data) data = data[0];
  });
}, 1);

process.on('uncaughtException', function(err) {
console.log(err.stack);
})


-- 
Best regards,

Jason Green
桂林

-- 
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


Re: [nodejs] Re: server accepting JSON in POST - how to secure/validate?

2012-02-29 Thread jason .
I am the author of mongoskin, and I wrote a validation module
https://github.com/guileen/node-iform to do the validation.

node-iform will verify the data in req.body, and what you want is validate
JSON, you can easily adapte json it to req.body

2012/1/22 Bradley Meck 

> That is a nuisance. The cache comparison and type coercion is the real
> security problem.
>
> --
> 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
>



-- 
Best regards,

Jason Green
桂林

-- 
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


Re: [nodejs] why this code memory leak

2012-02-29 Thread jason .
exec(function(err, data){}) this won't listen error?

在 2012年2月29日 下午7:56,Arnout Kazemier 写道:

> You don't have any error listeners assigned to redis
>
> On Wednesday, February 29, 2012 at 10:25 AM, jason.桂林 wrote:
>
> If you run below code, and restart you redis server, you will got one or
> two uncaughtException, but no more errors any more, and then, the memory
> will growing very fast, I want to know why
>
>  123456789101112131415161718192021
>
> /**
>  * This code will memory leak, if you restart redis server when the node 
> process is running
>  *
>  * @author Gui Lin
>  */
> var redis = require('redis').createClient();
>
> setInterval(function(){
>
>   redis.multi()
> .zrangebyscore('timeup', 0, Date.now())
> .zremrangebyscore('timeup', 0, Date.now())
> .exec(function(err, data) {
>   if(err) console.log(err.stack);
>   if(data) data = data[0];
>   });
> }, 1);
>
> process.on('uncaughtException', function(err) {
> console.log(err.stack);
> })
>
>
> --
> Best regards,
>
> Jason Green
> 桂林
>
>
>  --
> 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
>



-- 
Best regards,

Jason Green
桂林

-- 
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


[nodejs] Any way to do benchmark of http handlers for request and response without send request?

2012-04-22 Thread jason .
I am writing a project named 'kickstart' aim to create high performance web
APP template (not view template).

I hope the speed could close to node helloworld app.

So I need some way to benchmark my app. I use ab, but it has big problem in
Mac OS.

So, I hope, there is a tool could pass fake request and response to my
handlers, do all benchmark without network.

Can I ?

BTW, I have done very fast request dispatch.

https://github.com/guileen/node-kickstart

-- 
Best regards,

Jason Green
桂林

-- 
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


[nodejs]will kilos setTimeout spend too much resourece?

2012-04-22 Thread jason .
I need to write a service use something like in memory cache, and I want to
do `expire` things in setTimeout, will it very slow, If I expire too much
things, about kilos to millions.

-- 
Best regards,

Jason Green
桂林

-- 
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


Re: [nodejs]will kilos setTimeout spend too much resourece?

2012-04-23 Thread jason .
Oh cool! and I found

setTimeout(console.log, 1000, 'hello world')

is much better than

setTimeout(function(){
   console.log('hello world');
}, 1000)

在 2012年4月23日 下午2:32,Joran Greef 写道:

> If you pass a function reference to an existing function to setTimeout,
> and then call this function repeatedly, rather than creating a closure each
> setTimeout call, that will lower your memory and cpu overhead substantially.
>
>
> On Monday, April 23, 2012 7:49:08 AM UTC+2, Jason.桂林 wrote:
>>
>> I need to write a service use something like in memory cache, and I want
>> to do `expire` things in setTimeout, will it very slow, If I expire too
>> much things, about kilos to millions.
>>
>> --
>> Best regards,
>>
>> Jason Green
>> 桂林
>>
>>
>>  --
> 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
>



-- 
Best regards,

Jason Green
桂林

-- 
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


[nodejs]Hide cursor in CLI

2012-04-24 Thread jason .
I want to write a CLI program, but I got a little problem

var x = 0; setInterval(function(){ process.stdout.write('\r' + (++x)) }, 10)

I wrote this simple program ,  how to hide cursor in CLI?
--
Best regards,

Jason Green
桂林

-- 
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


Re: [nodejs]Hide cursor in CLI

2012-04-24 Thread jason .
Many node CLI program.

2012/4/24 Ryan Schmidt :
>
> On Apr 24, 2012, at 09:28, jason.桂林 wrote:
>
>> I want to write a CLI program, but I got a little problem
>>
>> var x = 0; setInterval(function(){ process.stdout.write('\r' + (++x)) }, 10)
>>
>> I wrote this simple program ,  how to hide cursor in CLI?
>
> That's a shell programming question, not a node question.
>
> http://www.unix.com/shell-programming-scripting/176837-bash-hide-terminal-cursor.html
>
> --
> 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



-- 
Best regards,

Jason Green
桂林

-- 
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


Re: [nodejs]Hide cursor in CLI

2012-04-24 Thread jason .
Thanks very much

2012/4/24 Ryan Schmidt :
>
> On Apr 24, 2012, at 09:33, Ryan Schmidt wrote:
>
>> On Apr 24, 2012, at 09:28, jason.桂林 wrote:
>>
>>> I want to write a CLI program, but I got a little problem
>>>
>>> var x = 0; setInterval(function(){ process.stdout.write('\r' + (++x)) }, 10)
>>>
>>> I wrote this simple program ,  how to hide cursor in CLI?
>>
>> That's a shell programming question, not a node question.
>>
>> http://www.unix.com/shell-programming-scripting/176837-bash-hide-terminal-cursor.html
>
> I guess there are node modules to help you do this. Here's an example of 
> someone using cursor.hide() and cursor.show(), where cursor is obtained from 
> require('ansi').
>
> https://gist.github.com/2299368
>
> There's also node-ncurses which has showCursor.
>
> https://github.com/mscdex/node-ncurses
>
> etc.
>
> --
> 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



-- 
Best regards,

Jason Green
桂林

-- 
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


[nodejs] network benchmark heat map?

2012-04-24 Thread jason .
I ever saw some chart like heat map, but it is for http server
benchmark, it has x y, also a depth color dot, I need some information
about this, but I don't know what the keyword should I google. Google
heat map I got something like geography heat map, not what I want.

-- 
Best regards,

Jason Green
桂林

-- 
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


Re: [nodejs] network benchmark heat map?

2012-04-24 Thread jason .
Thanks, Unlike the images in your link, what I saw is depth color in
each dot not block

2012/4/25 Ben Noordhuis :
> On Tue, Apr 24, 2012 at 19:38, jason.桂林  wrote:
>> I ever saw some chart like heat map, but it is for http server
>> benchmark, it has x y, also a depth color dot, I need some information
>> about this, but I don't know what the keyword should I google. Google
>> heat map I got something like geography heat map, not what I want.
>
> https://github.com/brendangregg/FlameGraph ?
>
> --
> 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



-- 
Best regards,

Jason Green
桂林

-- 
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


Re: [nodejs] Re: network benchmark heat map?

2012-04-25 Thread jason .
@mscdex yeap, heat-tracer, it is, what is the x/y/z is means?

2012/4/25 mscdex 

> On Apr 24, 9:43 pm, mscdex  wrote:
> > On Apr 24, 8:30 pm, jason.桂林  wrote:
> >
> > > Thanks, Unlike the images in your link, what I saw is depth color in
> > > each dot not block
> >
> > This kind of graph?:
> http://joyeur.com/2011/12/13/presenting-file-system-latency/
>
> which is more or less this: http://howtonode.org/heat-tracer
>
> --
> 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
>



-- 
Best regards,

Jason Green
桂林

-- 
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


Re: [nodejs]will kilos setTimeout spend too much resourece?

2012-04-25 Thread jason .
Reasonable !

在 2012年4月25日 上午10:30,alFReD NSH 写道:

> I think for something like that you should decide how accurate you want to
> be and use a function on an interval to remove all expired things. Like run
> the function on every minute or every second, depending on your need. A  A
> lot of timers are not a good, and not that much accurate.
>
>
> On Monday, 23 April 2012 13:49:08 UTC+8, Jason.桂林 wrote:
>>
>> I need to write a service use something like in memory cache, and I want
>> to do `expire` things in setTimeout, will it very slow, If I expire too
>> much things, about kilos to millions.
>>
>> --
>> Best regards,
>>
>> Jason Green
>> 桂林
>>
>>
>>  --
> 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
>



-- 
Best regards,

Jason Green
桂林

-- 
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


[nodejs] [node.js] Why my request slower and slower

2012-04-26 Thread jason .
My question attached code and image, please help me on stackoverflow,
thanks a lot.

http://stackoverflow.com/questions/10328492/why-my-request-slower-and-slower

-- 
Best regards,

Jason Green
桂林

-- 
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


[nodejs] Re: [node.js] Why my request slower and slower

2012-04-26 Thread jason .
I am writing a http benchmark module in node.js. I got a problem. I
separate my benchmark to several task to run. one task by one task. each
task define like 'GET /url for 1 times'.

My problem is, if I start a task 'GET / for 10 times' it response in
7.2k rps. If I separate the task to 10 task, 'GET / for 1 times', the
first task response fast, but the other tasks slower and slower.
http://stackoverflow.com/questions/10328492/why-my-request-slower-and-slower

2012/4/26 jason.桂林 

> My question attached code and image, please help me on stackoverflow,
> thanks a lot.
>
>
> http://stackoverflow.com/questions/10328492/why-my-request-slower-and-slower
>
> --
> Best regards,
>
> Jason Green
> 桂林
>
>
>


-- 
Best regards,

Jason Green
桂林

-- 
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


[nodejs] Re: [node.js] Why my request slower and slower

2012-04-26 Thread jason .
fixed, my foolish mistake

2012/4/26 jason.桂林 

> I am writing a http benchmark module in node.js. I got a problem. I
> separate my benchmark to several task to run. one task by one task. each
> task define like 'GET /url for 1 times'.
>
> My problem is, if I start a task 'GET / for 10 times' it response in
> 7.2k rps. If I separate the task to 10 task, 'GET / for 1 times', the
> first task response fast, but the other tasks slower and slower.
>
> http://stackoverflow.com/questions/10328492/why-my-request-slower-and-slower
>
> 2012/4/26 jason.桂林 
>
> My question attached code and image, please help me on stackoverflow,
>> thanks a lot.
>>
>>
>> http://stackoverflow.com/questions/10328492/why-my-request-slower-and-slower
>>
>> --
>> Best regards,
>>
>> Jason Green
>> 桂林
>>
>>
>>
>
>
> --
> Best regards,
>
> Jason Green
> 桂林
>
>
>


-- 
Best regards,

Jason Green
桂林

-- 
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


Re: [nodejs] Re: [node.js] Why my request slower and slower

2012-04-26 Thread jason .
OK, I explain here

the wrong code is:

function sendRequest
> 02  if(running > concurrent) return;
> 03  if(running ++ < concurrent && left >0)
> process.nextTick(sendRequest);
>
>   http.request(reqOptions, function(res) {
>res.on('end', function() {
>  running --;
> 08 if(--left == 0) {
> 09nextTask()
> 10 }
> process.nextTick(sendRequest)
>});
>   });
> }


When the tasks[1] is done, means left <= 0, line 9 will call nextTask
execute tasks[2], and but line 11 is still executed, and line 2 does not
filter the left < 0 and continue send request, so tasks[1] and tasks[2] is
both running, so the tasks[2] display rps just about half of tasks[1].

I modified 2 lines code  fixed this issue.

function sendRequest

  if(running > concurrent || left <=0) return;
  if(running ++ < concurrent) process.nextTick(sendRequest);

}

BTW: you can clone https://github.com/guileen/siege.js , run the example, I
bet you will like it even it is not complete yet.

It's easy to write a benchmark module

siege(__dirname + '/app.js')
  .concurrent(100)
  .for(1).times
  .get('/')
  .post('/')
  .attack()


It will automatic listen on a temp unix socket, if you not specify what
port to listen.

The output is colorful and real time.

Because of node.js keep alive the connections I think, I can get correct
benchmark on Mac OSX now, we know that `ab` get wrong result on Mac,
because of OS connections limitations I guess. What ever, I can do
benchmark on Mac now.

In the plan, it will also has the feature to enable cookie, and condtional
GET. maybe not now, maybe you can send a pull request.

siege(__dirname + '/app.js')
  .concurrent(100)
  .for(1).times
  .withCookie()
  .with304()
  .post('/login', {username:'username', password: 'password}).for(1).times
  .get('/')
  .attack()


2012/4/27 mscdex 

> On Apr 26, 12:58 pm, Matt  wrote:
> > Why did you remove the post though? Someone else might make the same
> > mistake - it's always good to keep history of how you fixed it.
>
> +1
>
> --
> 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
>



-- 
Best regards,

Jason Green
桂林

-- 
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


[nodejs]Route design

2012-04-27 Thread jason .
I tested that express is a little slower then non-express code. I planning
to design a new web framework and I also design a benchmark tool, to make
sure my framework is fast.

My basic thinking is fast routing, fast session, in memory cache and clean
code.

The first step is fast routing, I use a mechanism multi routing,

*1st is hash routing, e.g. app.get('/user/login', login),  will routing by
handlers['/user/login'](req, res);*
*
*
*2nd is multi hash routing, e.g. app.get('/user/:id/edit', editprofile),
will routing by handlers['user']['*']['edit'](req, res);*
*
*
*3rd is match routing, e.g. app.get(/user\/edit-(\d+)/, editprofile), will
routing by handlers.forEach(function(rule) { if(rule.test(req.path)
handlers[rule](req, res) })*
*
*
but before do this, I have to design the routing api. is sinatra like api
good enough?  when I coding, I still need seprate the routings to different
files, so we have below code

1: in app.js:

>   app.get('/user/login', routes.user.login)


or 2: in routes/user.js :

  var app = require('../app');
>   app.get('/user/login, function(req, res, next) { // code here });


or 3
in app.js:

>require('./routes')(app);


in routes/user.js

module.exports = function(app) {
>   app.get('/routes/user', function(req, res, next){// code here})
> }


Did you see the problem?

We can just map  `get.user.login` to GET '/user/login' to save typing and
ignore circulate dependency.

get/index.js
> var app = module.export
> // url: /  url: /index  goes here
> app.index = function(req, res) {}
> // url: /user goes here and all request of /user/* not found matchs goes
> here
> app.user = require('./user')
> get/user.js
> // url: /user/  and url: /user/index goes here
> user.index = function(req, res){}
> // url: /user/login goes here
> user.login = function(req, res) {}


but this method has a problem, how define param routing and regex routing?

What do you think about all these things?

-- 
Best regards,

Jason Green
桂林

-- 
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


Re: [nodejs]Route design

2012-04-28 Thread jason .
under my test, routing is not only 5%. I will show my benchmark soon.

2012/4/28 tjholowaychuk 

> I can personally guarantee you routing will be less than 5% of your
> bottleneck, focus on real-world problems, and profile first
>
> On Friday, 27 April 2012 10:39:57 UTC-7, Jason.桂林 wrote:
>>
>> I tested that express is a little slower then non-express code. I
>> planning to design a new web framework and I also design a benchmark tool,
>> to make sure my framework is fast.
>>
>> My basic thinking is fast routing, fast session, in memory cache and
>> clean code.
>>
>> The first step is fast routing, I use a mechanism multi routing,
>>
>> *1st is hash routing, e.g. app.get('/user/login', login),  will routing
>> by handlers['/user/login'](req, res);*
>> *
>> *
>> *2nd is multi hash routing, e.g. app.get('/user/:id/edit', editprofile),
>> will routing by handlers['user']['*']['edit'](req, res);*
>> *
>> *
>> *3rd is match routing, e.g. app.get(/user\/edit-(\d+)/, editprofile),
>> will routing by handlers.forEach(function(rule) { if(rule.test(req.path)
>> handlers[rule](req, res) })*
>> *
>> *
>> but before do this, I have to design the routing api. is sinatra like api
>> good enough?  when I coding, I still need seprate the routings to different
>> files, so we have below code
>>
>> 1: in app.js:
>>
>>>   app.get('/user/login', routes.user.login)
>>
>>
>> or 2: in routes/user.js :
>>
>>   var app = require('../app');
>>>   app.get('/user/login, function(req, res, next) { // code here });
>>
>>
>> or 3
>> in app.js:
>>
>>>require('./routes')(app);
>>
>>
>> in routes/user.js
>>
>> module.exports = function(app) {
>>>   app.get('/routes/user', function(req, res, next){// code here})
>>> }
>>
>>
>> Did you see the problem?
>>
>> We can just map  `get.user.login` to GET '/user/login' to save typing and
>> ignore circulate dependency.
>>
>> get/index.js
>>> var app = module.export
>>> // url: /  url: /index  goes here
>>> app.index = function(req, res) {}
>>> // url: /user goes here and all request of /user/* not found matchs goes
>>> here
>>> app.user = require('./user')
>>> get/user.js
>>> // url: /user/  and url: /user/index goes here
>>> user.index = function(req, res){}
>>> // url: /user/login goes here
>>> user.login = function(req, res) {}
>>
>>
>> but this method has a problem, how define param routing and regex routing?
>>
>> What do you think about all these things?
>>
>> --
>> Best regards,
>>
>> Jason Green
>> 桂林
>>
>>
>>   --
> 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
>



-- 
Best regards,

Jason Green
桂林

-- 
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


Re: [nodejs]Route design

2012-04-28 Thread jason .
@TJ you are right, I am using something like helloworld, but it is
real-world application.

Why hello world is real-world application, because I use cache layer, even
more, I can use a In-Process-Cache layer. So, the IO layer could be very
fast.

I have done a very first version routing, here is my benchmark result.

express constant path routing

app.get('/', function(req, res) { res.send(); })


rps: 5943

express param path routing

app.get('/user/:userid', function(req, res) { res.send() });


rps: 5740


My small routing module, named kick.js, choose the same syntax with express

app.get('/', funtion(req, res) { res.end( 'hello world' ) })


rps: 7451

app.get('/user/:userid', function(req, res) { res.end( req.params.userid )
> })


rps: 7180

on MacBook Air, benchmark with siege.js

https://github.com/guileen/kick.js

https://github.com/guileen/siege.js

2012/4/29 C. Mundi 

> Where *did* you get that graphic?  LOL.
> On Apr 27, 2012 11:46 AM, "Marak Squires"  wrote:
>
> --
> 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
>



-- 
Best regards,

Jason Green
桂林

-- 
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


Re: [nodejs]Route design

2012-04-28 Thread jason .
@ Susiripala I am afraid I can't. Why kick.js is faster because it is very
simple with limited feature, it can NOT compatible with all connect
middleware.

connect use EventEmitter to communicate between middlewares.

Routing could be improved in express, but how it chain the middlewares is
different with kick.js I guess.

How kick.js handling the middlewares chain is show in the link

https://github.com/guileen/kick.js/blob/master/kick.js#L260-283

If you have any suggestion let me know, or send a pull request

2012/4/29 Arunoda Susiripala 

> I think jason have a some point here.
> What I feel is like this.
>
> Express is not bad & it can be improved.
> @TJ
> Why are you so against on this discussion.
>
> If I'm the author of express.
> I'll ask jason to patch express and try to make his improvements into
> express core :P
>
>
> On Sun, Apr 29, 2012 at 11:36 AM, jason.桂林  wrote:
>
>> @TJ you are right, I am using something like helloworld, but it is
>> real-world application.
>>
>> Why hello world is real-world application, because I use cache layer,
>> even more, I can use a In-Process-Cache layer. So, the IO layer could be
>> very fast.
>>
>> I have done a very first version routing, here is my benchmark result.
>>
>> express constant path routing
>>
>> app.get('/', function(req, res) { res.send(); })
>>
>>
>> rps: 5943
>>
>> express param path routing
>>
>> app.get('/user/:userid', function(req, res) { res.send() });
>>
>>
>> rps: 5740
>>
>>
>> My small routing module, named kick.js, choose the same syntax with
>> express
>>
>> app.get('/', funtion(req, res) { res.end( 'hello world' ) })
>>
>>
>> rps: 7451
>>
>> app.get('/user/:userid', function(req, res) { res.end( req.params.userid
>>> ) })
>>
>>
>> rps: 7180
>>
>> on MacBook Air, benchmark with siege.js
>>
>> https://github.com/guileen/kick.js
>>
>> https://github.com/guileen/siege.js
>>
>> 2012/4/29 C. Mundi 
>>
>> Where *did* you get that graphic?  LOL.
>>> On Apr 27, 2012 11:46 AM, "Marak Squires" 
>>> wrote:
>>>
>>> --
>>> 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
>>>
>>
>>
>>
>> --
>> Best regards,
>>
>> Jason Green
>> 桂林
>>
>>
>>  --
>> 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
>>
>
>
>
> --
> Arunoda Susiripala
>
> @arunoda <http://twitter.com/arunoda>
> <http://gplus.to/arunoda>https://github.com/arunoda
> http://www.linkedin.com/in/arunoda
>
>  --
> 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
>



-- 
Best regards,

Jason Green
桂林

-- 
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


Re: [nodejs]Route design

2012-04-29 Thread jason .
What I said previously maybe wrong, kick.js can use connect middleware,
just test logger, static, cookieParser, session, bodyParser



2012/4/29 jason.桂林 

> @ Susiripala I am afraid I can't. Why kick.js is faster because it is very
> simple with limited feature, it can NOT compatible with all connect
> middleware.
>
> connect use EventEmitter to communicate between middlewares.
>
> Routing could be improved in express, but how it chain the middlewares is
> different with kick.js I guess.
>
> How kick.js handling the middlewares chain is show in the link
>
> https://github.com/guileen/kick.js/blob/master/kick.js#L260-283
>
> If you have any suggestion let me know, or send a pull request
>
>
> 2012/4/29 Arunoda Susiripala 
>
>> I think jason have a some point here.
>> What I feel is like this.
>>
>> Express is not bad & it can be improved.
>> @TJ
>> Why are you so against on this discussion.
>>
>> If I'm the author of express.
>> I'll ask jason to patch express and try to make his improvements into
>> express core :P
>>
>>
>> On Sun, Apr 29, 2012 at 11:36 AM, jason.桂林  wrote:
>>
>>> @TJ you are right, I am using something like helloworld, but it is
>>> real-world application.
>>>
>>> Why hello world is real-world application, because I use cache layer,
>>> even more, I can use a In-Process-Cache layer. So, the IO layer could be
>>> very fast.
>>>
>>> I have done a very first version routing, here is my benchmark result.
>>>
>>> express constant path routing
>>>
>>> app.get('/', function(req, res) { res.send(); })
>>>
>>>
>>> rps: 5943
>>>
>>> express param path routing
>>>
>>> app.get('/user/:userid', function(req, res) { res.send() });
>>>
>>>
>>> rps: 5740
>>>
>>>
>>> My small routing module, named kick.js, choose the same syntax with
>>> express
>>>
>>> app.get('/', funtion(req, res) { res.end( 'hello world' ) })
>>>
>>>
>>> rps: 7451
>>>
>>> app.get('/user/:userid', function(req, res) { res.end( req.params.userid
>>>> ) })
>>>
>>>
>>> rps: 7180
>>>
>>> on MacBook Air, benchmark with siege.js
>>>
>>> https://github.com/guileen/kick.js
>>>
>>> https://github.com/guileen/siege.js
>>>
>>> 2012/4/29 C. Mundi 
>>>
>>> Where *did* you get that graphic?  LOL.
>>>> On Apr 27, 2012 11:46 AM, "Marak Squires" 
>>>> wrote:
>>>>
>>>> --
>>>> 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
>>>>
>>>
>>>
>>>
>>> --
>>> Best regards,
>>>
>>> Jason Green
>>> 桂林
>>>
>>>
>>>  --
>>> 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
>>>
>>
>>
>>
>> --
>> Arunoda Susiripala
>>
>> @arunoda <http://twitter.com/arunoda>
>> <http://gplus.to/arunoda>https://github.com/arunoda
>> http://www.linkedin.com/in/arunoda
>>
>>  --
>> 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
>>
>
>
>
> --
> Best regards,
>
> Jason Green
> 桂林
>
>
>


-- 
Best regards,

Jason Green
桂林

-- 
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


Re: [nodejs] Re: Route design

2012-04-29 Thread jason .
@TJ you are right, compare simple kick.js with express is irrelevant. I
will use node helloworld instead of express to do comparing.

Optimized with regular node http.createServer(), why I didn't realize that.

-- 
Best regards,

Jason Green
桂林

-- 
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


Re: [nodejs] Re: Building Node.js Modular Web Application

2012-04-30 Thread jason .
connect.vhost
http://www.senchalabs.org/connect/vhost.html

2012/4/30 akira 

> I don't understand, sub projects as in different sub-domains or
> different routes?. You can make your project as modular as you want. I
> for example, have a folders called "forms" and "controllers", The
> forms and controllers in these folders are not too project specific
> and that allows me to reuse them without change in other projects
>
> On Apr 30, 12:27 pm, Feras Odeh  wrote:
> > Thanks all,
> >
> > I'm already using express MVC can we consider my app as modular if I used
> > express MVC approach ? Or should I seperate my project into smaller sub
> > projects to be modular?
> >
> >
> >
> >
> >
> >
> >
> > On Monday, April 30, 2012 1:21:14 PM UTC+3, Nuno Job wrote:
> >
> > > In case you are interested in trying flatironjs
> > > (http://flatironjs.org) out I wrote this sample REST service.
> >
> > > Plates is a super cool templating engine.
> >
> > >https://github.com/dscape/jsconf12
> >
> > > On Mon, Apr 30, 2012 at 11:03 AM, akira wrote:
> > > > There are several ways to code MVC apps with Express, here is an
> > > > example:
> > > >http://www.travisglines.com/web-coding/a-simple-mvc-setup-in-node-js
> >
> > > > On Apr 30, 11:06 am, Feras Odeh  wrote:
> > > >> How can I build a modular web application using Node.js? What
> modules
> > > >> should I use to write it? I'm using express MVC does this
> considered as
> > > >> modular system?
> >
> > > > --
> > > > 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
>



-- 
Best regards,

Jason Green
桂林

-- 
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


[nodejs] redis helloworld slow than redis and helloworld

2012-04-30 Thread jason .
here is my test

var redisClient = redis.createClient();
> http.createServer(function(req, res) {
> redisClient.set('foo', 'bar', function(err, data) {
> res.end('hello world')
> })
> }).listen(3000)


RPS: 5k

but when I test redisClient standalone, it is 27k RPS. test helloworld
without redis is 7.5k RPS.

Why a 27K code slow down a 7.5k code ? How can I optimize it?

-- 
Best regards,

Jason Green
桂林

-- 
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


Re: [nodejs] Re: redis helloworld slow than redis and helloworld

2012-05-01 Thread jason .
Oh, thanks, you explain this problem very clearly.

I think this could be optimize by cluster

if (cluster.isMaster) {
   for (var i = 0; i < numCPUs; i++) {
 cluster.fork();
}
} else {
   // helloworld + redis
}

But, it seems not very much


WITH cluster

GET:/
> done:3
> 200 OK: 3
> rps: 6891
> response: 2ms(min) 20ms(max) 2ms(avg)
> GET:/redis
> done:3
> 200 OK: 3
> rps: 5789
> response: 2ms(min) 41ms(max) 3ms(avg)



WITHOUT cluster

GET:/
> done:3
> 200 OK: 3
> rps: 7389
> response: 1ms(min) 19ms(max) 2ms(avg)
> GET:/redis
> done:3
> 200 OK: 3
> rps: 5652
> response: 2ms(min) 20ms(max) 3ms(avg)
>

2012/5/1 Jimb Esser 

> The math on that works out almost perfectly.  You can't do math on
> "responses per second" and get anything intuitive, but you can on
> "seconds per response".
> redisClient standalone = 27k RPS = 0.04ms/response
> helloworld = 7.5 RPS = 0.13ms/response
> Expected sum = 0.17ms/response = 5.8k RPS, which is pretty close to
> what you're seeing.
>
> On Apr 30, 9:00 am, jason.桂林  wrote:
> > here is my test
> >
> > var redisClient = redis.createClient();
> >
> > > http.createServer(function(req, res) {
> > > redisClient.set('foo', 'bar', function(err, data) {
> > > res.end('hello world')
> > > })
> > > }).listen(3000)
> >
> > RPS: 5k
> >
> > but when I test redisClient standalone, it is 27k RPS. test helloworld
> > without redis is 7.5k RPS.
> >
> > Why a 27K code slow down a 7.5k code ? How can I optimize it?
> >
> > --
> > Best regards,
> >
> > Jason Green
> > 桂林
>
> --
> 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
>



-- 
Best regards,

Jason Green
桂林

-- 
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


Re: [nodejs] Re: redis helloworld slow than redis and helloworld

2012-05-01 Thread jason .
I run 4 node instance listen on different port, use nginx load balance
module, with keep-alive connection, this problem fixed. Very fast.

2012/5/1 jason.桂林 

> Oh, thanks, you explain this problem very clearly.
>
> I think this could be optimize by cluster
>
> if (cluster.isMaster) {
>for (var i = 0; i < numCPUs; i++) {
>  cluster.fork();
> }
> } else {
>// helloworld + redis
> }
>
> But, it seems not very much
>
>
> WITH cluster
>
> GET:/
>> done:3
>> 200 OK: 3
>> rps: 6891
>>  response: 2ms(min) 20ms(max) 2ms(avg)
>> GET:/redis
>> done:3
>> 200 OK: 3
>> rps: 5789
>>  response: 2ms(min) 41ms(max) 3ms(avg)
>
>
>
> WITHOUT cluster
>
> GET:/
>> done:3
>> 200 OK: 3
>> rps: 7389
>>  response: 1ms(min) 19ms(max) 2ms(avg)
>> GET:/redis
>> done:3
>> 200 OK: 3
>> rps: 5652
>>  response: 2ms(min) 20ms(max) 3ms(avg)
>>
>
> 2012/5/1 Jimb Esser 
>
>> The math on that works out almost perfectly.  You can't do math on
>> "responses per second" and get anything intuitive, but you can on
>> "seconds per response".
>> redisClient standalone = 27k RPS = 0.04ms/response
>> helloworld = 7.5 RPS = 0.13ms/response
>> Expected sum = 0.17ms/response = 5.8k RPS, which is pretty close to
>> what you're seeing.
>>
>> On Apr 30, 9:00 am, jason.桂林  wrote:
>> > here is my test
>> >
>> > var redisClient = redis.createClient();
>> >
>> > > http.createServer(function(req, res) {
>> > > redisClient.set('foo', 'bar', function(err, data) {
>> > > res.end('hello world')
>> > > })
>> > > }).listen(3000)
>> >
>> > RPS: 5k
>> >
>> > but when I test redisClient standalone, it is 27k RPS. test helloworld
>> > without redis is 7.5k RPS.
>> >
>> > Why a 27K code slow down a 7.5k code ? How can I optimize it?
>> >
>> > --
>> > Best regards,
>> >
>> > Jason Green
>> > 桂林
>>
>> --
>> 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
>>
>
>
>
> --
> Best regards,
>
> Jason Green
> 桂林
>
>
>


-- 
Best regards,

Jason Green
桂林

-- 
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


Re: [nodejs] Re: redis helloworld slow than redis and helloworld

2012-05-01 Thread jason .
Why "load balancing is not very optimal at the moment. " ? any background
story?

-- 
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


[nodejs] How to change process name? process.title not works

2012-05-01 Thread jason .
http://nodejs.org/api/process.html#process_process_title

process.title not works

var http = require('http');
> http.createServer().listen(3000);
> console.log(process.title)
> process.title = 'nodenode'


`ps | grep node` show still `node test.js`

-- 
Best regards,

Jason Green
桂林

-- 
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


Re: [nodejs] Re: How to change process name? process.title not works

2012-05-01 Thread jason .
I using OSX / node v0.6.15 , I test it again

2012/5/1 mscdex 

> On May 1, 11:07 am, jason.桂林  wrote:
> > `ps | grep node` show still `node test.js`
>
> It works fine for me on Linux/node v0.6.16.
>
> --
> 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
>



-- 
Best regards,

Jason Green
桂林

-- 
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


Re: [nodejs] Re: How to change process name? process.title not works

2012-05-01 Thread jason .
OSX v0.6.16, still fails

2012/5/1 jason.桂林 

> I using OSX / node v0.6.15 , I test it again
>
> 2012/5/1 mscdex 
>
>> On May 1, 11:07 am, jason.桂林  wrote:
>> > `ps | grep node` show still `node test.js`
>>
>> It works fine for me on Linux/node v0.6.16.
>>
>> --
>> 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
>>
>
>
>
> --
> Best regards,
>
> Jason Green
> 桂林
>
>
>


-- 
Best regards,

Jason Green
桂林

-- 
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


Re: [nodejs] Re: How to change process name? process.title not works

2012-05-01 Thread jason .
Sadly.

I just create an interesting module named 'master' to do interesting thing
about cluster and forks, the only thing I don't like is it shows all child
process in same process title.

I'd like to show something here.

if app.js is a server bind to a port:

master(__dirname + '/app.js').cluster().listen();


this code will fork n app.js process, n is the num of cpu.

if app.js is a server but not bind to a port:

master(__dirname + '/app.js').listen('3001..3004')


this code will fork app.js and listen from 3001 to 3004.

if app.js is a handler like `function(req, res)`:

master(__dirname + '/app.js').http.createServer().listen([3000, 4000,
> 5000])


this code will run app.js on 3000, 4000, 5000 port

And a complex example

master(__dirname +
'/app.js').cluster(4).net.createServer(option).listen('/tmp/app[100..110].sock')

this code will create a tcp server listen at /tmp/app100.sock to
/tmp/app110.sock, each sock file has 4 cluster workers.

2012/5/1 Chris Rhoden 

> I remember reading in the docs that process.title didn't work on OSX, but
> it looks like that addendum isn't in the docs anymore.
>
>
> On Tue, May 1, 2012 at 11:24 AM, jason.桂林  wrote:
>
>> OSX v0.6.16, still fails
>>
>> 2012/5/1 jason.桂林 
>>
>> I using OSX / node v0.6.15 , I test it again
>>>
>>> 2012/5/1 mscdex 
>>>
>>>> On May 1, 11:07 am, jason.桂林  wrote:
>>>> > `ps | grep node` show still `node test.js`
>>>>
>>>> It works fine for me on Linux/node v0.6.16.
>>>>
>>>> --
>>>> 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
>>>>
>>>
>>>
>>>
>>> --
>>> Best regards,
>>>
>>> Jason Green
>>> 桂林
>>>
>>>
>>>
>>
>>
>> --
>> Best regards,
>>
>> Jason Green
>> 桂林
>>
>>
>>  --
>> 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
>>
>
>
>
> --
> chrisrhoden
>
>  --
> 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
>



-- 
Best regards,

Jason Green
桂林

-- 
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


[nodejs] request an english name for a node development group

2012-05-01 Thread jason .
I am a chinese, so my english not very good, but I need a english name for
the node development group.

This group will develop some module, simple, efficient, nice API, I hope
the group name has these elements.

Here is some name from chinese guys, but I don't know if it fit for english
language.

1. nodule  (node module)

2. kissnode

3. nude

I hope you cool guys could tell me which is better, or give me a better
name. Thanks a lot.

-- 
Best regards,

桂林 (Gui Lin)

guileen@twitter
桂林-V@weibo 
guileen@github 

-- 
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


Re: [nodejs] request an english name for a node development group

2012-05-01 Thread jason .
What do you plan on building? :)

A set of tools, missing modules, etc.

About chinese name, not yet, chinese name seems not very important in
developer social, we'd like to use a chinese word has
similar pronunciation base on english name.

If the name is not about node and development is also OK, something nature,
plants, animals name is also very good, if it has a good pronunciation.

2012/5/2 Ruben LZ Tan 

>  Coincidently the closes chinese character I can think of is brain (脑).
> Build from there I guess?
>
> Thanks,
> Ruben Tan
>
> On Wednesday, May 2, 2012 at 11:56 AM, Marak Squires wrote:
>
> I would say something like:
>
> "Team Awesome"
>
> On Tue, May 1, 2012 at 8:44 PM, jason.桂林  wrote:
>
> I am a chinese, so my english not very good, but I need a english name for
> the node development group.
>
> This group will develop some module, simple, efficient, nice API, I hope
> the group name has these elements.
>
> Here is some name from chinese guys, but I don't know if it fit for
> english language.
>
> 1. nodule  (node module)
>
> 2. kissnode
>
> 3. nude
>
> I hope you cool guys could tell me which is better, or give me a better
> name. Thanks a lot.
>
> --
> Best regards,
>
> 桂林 (Gui Lin)
>
> guileen@twitter
> 桂林-V@weibo <http://weibo.com/guileen>
> guileen@github <https://github.com/guileen>
>
>  --
> 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
>
>
>
>
> --
> --
> Marak Squires
> Co-founder and Chief Evangelist
> Nodejitsu, Inc.
> marak.squi...@gmail.com
>
>  --
> 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
>



-- 
Best regards,

桂林 (Gui Lin)

guileen@twitter
桂林-V@weibo <http://weibo.com/guileen>
guileen@github <https://github.com/guileen>

-- 
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


Re: [nodejs] request an english name for a node development group

2012-05-01 Thread jason .
How about noodles, but it has been taken, how about node-noodles,

Base on this name, two chinese character in my minde '糯粉', pronounce as
'nuo fen', means 'flour of glutinous rice', which 'nuo' sounds like 'node',
'fen' (粉) has means of 'fans' as the sounds.

But 'nuofen' looks like not a good english name.

2012/5/2 jason.桂林 

> What do you plan on building? :)
>
> A set of tools, missing modules, etc.
>
> About chinese name, not yet, chinese name seems not very important in
> developer social, we'd like to use a chinese word has
> similar pronunciation base on english name.
>
> If the name is not about node and development is also OK, something
> nature, plants, animals name is also very good, if it has a
> good pronunciation.
>
>
> 2012/5/2 Ruben LZ Tan 
>
>>  Coincidently the closes chinese character I can think of is brain (脑).
>> Build from there I guess?
>>
>> Thanks,
>> Ruben Tan
>>
>>  On Wednesday, May 2, 2012 at 11:56 AM, Marak Squires wrote:
>>
>> I would say something like:
>>
>> "Team Awesome"
>>
>> On Tue, May 1, 2012 at 8:44 PM, jason.桂林  wrote:
>>
>> I am a chinese, so my english not very good, but I need a english name
>> for the node development group.
>>
>> This group will develop some module, simple, efficient, nice API, I hope
>> the group name has these elements.
>>
>> Here is some name from chinese guys, but I don't know if it fit for
>> english language.
>>
>> 1. nodule  (node module)
>>
>> 2. kissnode
>>
>> 3. nude
>>
>> I hope you cool guys could tell me which is better, or give me a better
>> name. Thanks a lot.
>>
>> --
>> Best regards,
>>
>> 桂林 (Gui Lin)
>>
>> guileen@twitter
>> 桂林-V@weibo <http://weibo.com/guileen>
>> guileen@github <https://github.com/guileen>
>>
>>  --
>> 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
>>
>>
>>
>>
>> --
>> --
>> Marak Squires
>> Co-founder and Chief Evangelist
>> Nodejitsu, Inc.
>> marak.squi...@gmail.com
>>
>>  --
>> 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
>>
>
>
>
> --
> Best regards,
>
> 桂林 (Gui Lin)
>
> guileen@twitter
> 桂林-V@weibo <http://weibo.com/guileen>
> guileen@github <https://github.com/guileen>
>
>


-- 
Best regards,

桂林 (Gui Lin)

guileen@twitter
桂林-V@weibo <http://weibo.com/guileen>
guileen@github <https://github.com/guileen>

-- 
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


Re: [nodejs] request an english name for a node development group

2012-05-01 Thread jason .
> nuofen ? you all like it?


2012/5/2 mdcb808 

>
> > nuofen
>
> like it too - might pass it through some kind of law immigration officer
> filter? to help with the keystroke
> this wont work: nodfun
>
>
> --
> 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+unsubscribe@**googlegroups.com
> For more options, visit this group at
> http://groups.google.com/**group/nodejs?hl=en?hl=en
>



-- 
Best regards,

桂林 (Gui Lin)

guileen@twitter
桂林-V@weibo 
guileen@github 

-- 
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


[nodejs]How github redirect ry/node to joyent/node

2012-05-02 Thread jason .
I also want to transfer my repo to an organization, but github said it will
not do redirect things, but how https://github.com/ry/node auto redirect to
https://github.com/joyent/node ?

-- 
Best regards,

桂林 (Gui Lin)

guileen@twitter
桂林-V@weibo 
guileen@github 

-- 
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


Re: [nodejs]How github redirect ry/node to joyent/node

2012-05-02 Thread jason .
https://github.com/guileen/node-mongoskin

https://github.com/64/node-mongoskin

2012/5/3 mario 

>
> Click on the repository, then Admin, down the page to "Danger Zone(tm)" and
> to 'Transfer Ownership, Transfer this repo to another user or an
> organization where you have admin rights.'
>
> On Thursday, 3 May 2012 05:05:26 UTC+2, Jason.桂林(Gui Lin) wrote:
>>
>> I also want to transfer my repo to an organization, but github said it
>> will not do redirect things, but how https://github.com/ry/node auto
>> redirect to https://github.com/joyent/node ?
>>
>> --
>> Best regards,
>>
>> 桂林 (Gui Lin)
>>
>> guileen@twitter
>> 桂林-V@weibo <http://weibo.com/guileen>
>> guileen@github <https://github.com/guileen>
>>
>>  --
> 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
>



-- 
Best regards,

桂林 (Gui Lin)

guileen@twitter
桂林-V@weibo <http://weibo.com/guileen>
guileen@github <https://github.com/guileen>

-- 
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


Re: [nodejs] request an english name for a node development group

2012-05-03 Thread jason .
Thanks a lot. every one.

Finally I pick a very short name: '64'

https://github.com/64

If any one have interesting join this opensource team, contact me.

-- 
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


[nodejs]Hey, Team up

2012-05-03 Thread jason .
I think there are many noders like me, writing code, push to github, sent
faint voice in opensource world.

Job not always cover our interesting, we have something more want to do.

Sometimes I feel lonely, I think I can not get all details done by myself
alone.

I think I am not the only one have this feeling, I hope we can team up,
make some great things.

I create an organization on github, I hope some guys could join this team,
and we maintain projects together.

It's very simple to join this organization, match any condition of below is
ok to join:

1. transfer you project to the organization and organization think you
project has achieve the quality to join.
2. send more than one pull request to the projects of organization, and
team accepted the pull request.
3. help on website, social marketing, etc.

I think some guys must have questions, I list several what I have thought

Q: We will get paid if we join the team?
A: No, or not for now.

Q: Why we join the team if no paid?
A: Opensource always get no paid, but team make us a bit more powerful.
Maybe we will get something we never think about.

Q: What the team will built?
A: Currently, I put some node modules into the team, but these modules is
preparing for website and other programes, the team will focus on internet
and smartphone, maybe games if we have enough resources. The details of
what we built will be discussed after team up.

Q: Who are you?
A: I am a Chinese guy, a programmer, a noder. I hope the members of team
comes from different countries regions, what we made should be
internationalized.

Q: What's the name of team?
A: Tough question, name has not been determined, the most important is team
values, what we built should be practical, nice and smart.

Link to team
https://github.com/64


-- 
Best regards,

桂林 (Gui Lin)

guileen@twitter
桂林-V@weibo 
guileen@github 

-- 
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


[nodejs] How to make a high quality chat server?

2012-05-06 Thread jason .
I just join hackthon party, our team made a very cool chat web application
in 24 hours.

But I know, it is a demo, It use socket.io, redis, I think it is a little
expensive on session. and it can't communicate with processes it make it
cluster.

What nodejs could be use to? frontend server? core internal server?

Some body said ZMQ is very fast message queue, is it help with this case?



-- 
Best regards,

桂林 (Gui Lin)

guileen@twitter
桂林-V@weibo 
guileen@github 

-- 
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


Re: [nodejs] Re: How to make a high quality chat server?

2012-05-06 Thread jason .
Thanks Roly, it's very useful for single machine app.

I have a real app question. If we have millions of online user, how to
computer system capacity, and how to design a architecture to fit the
capacity?



2012/5/6 Roly Fentanes 

> https://github.com/fent/socket.io-clusterhub
>
>
> On Sunday, May 6, 2012 4:04:30 AM UTC-7, Jason.桂林(Gui Lin) wrote:
>>
>> I just join hackthon party, our team made a very cool chat web
>> application in 24 hours.
>>
>> But I know, it is a demo, It use socket.io, redis, I think it is a
>> little expensive on session. and it can't communicate with processes it
>> make it cluster.
>>
>> What nodejs could be use to? frontend server? core internal server?
>>
>> Some body said ZMQ is very fast message queue, is it help with this case?
>>
>>
>>
>> --
>> Best regards,
>>
>> 桂林 (Gui Lin)
>>
>> guileen@twitter
>> 桂林-V@weibo <http://weibo.com/guileen>
>> guileen@github <https://github.com/guileen>
>>
>>   --
> 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
>



-- 
Best regards,

桂林 (Gui Lin)

guileen@twitter
桂林-V@weibo <http://weibo.com/guileen>
guileen@github <https://github.com/guileen>

-- 
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


[nodejs][ANN] siege.js by kissjs.org publish 0.0.2

2012-05-06 Thread jason .
siege.js is a http benchmark module.

features:

* benchmark with keep alive connection, (useful on mac os)
* colorful report
* multiple task define
* cookie support (>= 0.0.2)

example:

siege()
>   .on(3000)
>   .for(1).times
>   .get('/')
>   .attack()


for a nodejs app.js, which module.exports = function(req, res), you can use
siege start your server, before benchmark, and close server after benchmark.

siege(__dirname + '/app.js')
>   .on(4000)
>   .withCookie
>   .for(1).times
>   .concurrent(100)
>   .get('/set-cookie')
>   .get('/get-cookie')
>   .get('/').withoutCookie
>   .attack()


enjoy it.

by kissjs.org.

We are looking for collaborators.
-- 
Best regards,

桂林 (Gui Lin)

guileen@twitter
桂林-V@weibo 
guileen@github 

-- 
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


Re: [nodejs] Re: How to make a high quality chat server?

2012-05-06 Thread jason .
Thanks Micheil, what you said is very professional, do you have a twitter
or G+ account, I want follow you, heh.

1. What you said pull base rather than pull base, looks like a new
 thinking, but I can understand why you said this, I have thought lots
about push base message broadcast, very complex. Maybe pull base will be
very simple also beautiful solution.

2. You said transport protocol, I'd like to use msgpack<http://msgpack.org/> as
protocal, but I need help on the protocol, because msgpack is not compress
on string, I am also afraid there are some security problem.

3. " I would recommend looking into using more servers with lower load
versus fewer servers with higher load;  " I'd like talk more about this,

we have to use more servers for scaling, but more servers means more
complex, unlike other web applications, realtime service need communication
 between servers, we have 1M users dispatched on 1K servers, 1K user on
each server, 1 user send a message in a room, this message will send to
others users. In worst case the server for sender and server for reciever
on cover all 1K server, so this message will send to all 1K server.

if 100 user(10%) on each 1K servers send worst message, each server will
recieve 100K messages in same time, it's horrible.

How to prevent this happen?


2012/5/6 Micheil Smith 

> If you have millions of users on line, I think you'll be facing other
> problems than just
> Socket.io, some old-ish benchmarks showed socket.io maxing out at around
> 5-20K
> concurrents in a single process, other websocket servers performed
> differently. If
> you're serious about scaling realtime infrastructure, then you should
> probably have
> a look at talks from Keeping It Realtime Conference (
> http://2011.krtconf.com/), as well
> as looking into Autobahn Test Suite benchmarks.
>
> Things to be cautious of:
>
>- You'll need a way to do load balancing (Traditional load balancers
> tend to fail
>   pretty hard with WebSockets or persistent Connections)
>
>- I would NOT recommend using redis or any other centralised message
> bus, this
>  is by far the easiest way to do scaling across multiple servers,
> however, it's also
>  the easiest way to shoot yourself in the foot if the message bus goes
> down
>  (process crash, server network isolation, etc).
>
>- I would recommend looking into using more servers with lower load
> versus fewer
>  servers with higher load; This will enable you to scale much better
> in short bursts.
>  (experience tells me that generally you'll find that your application
> or service will
>  have peaks and troughs in usage, generally these match up well if the
> three main
>  timezone blocks (US, GMT, and East Asian / Oceanic)
>
> Those points aside, getting above 100K concurrent users tends to be
> incredibly hard,
> some of the largest apps around that I've seen have only just been pushing
> 250K (we're
> talking like big service providers that have 500K -> 2M users, I can't
> name them due
> to legal reasons).
>
> As for storage of data, you will most likely need both realtime
> communication between
> servers as well as some sort of key/value store for things like presence
> information and
> authentication tokens. For the storage of data, I would actually recommend
> redis, it tends
> to scale out really well for master / slave type stuff. As for message
> communication, I'm
> beginning to think that pull-based may be better than push based, so
> something like
> Apache Kafka (not that I've had personal experience with it.)
>
> You will most likely want to also define a transport protocol on top of
> your connection,
> dependent on your type of application, there aren't many resources on
> doing this, but
> if you want help with that, give me a shout, I've done a lot of research
> into that area over
> the last two years.
>
> Alternatively, you could look at third party services for scaling your
> realtime architecture.
> At present, given the information I have on various services, I would be
> inclined to
> recommend PubNub (http://pubnub.com), they appear to have a very high
> quality setup.
> (disclaimer, I did work for a competitor in the past, but that does not
> bias my choice,
> another option is Pusher (http://pusher.com), or for more, you can look
> here:
> http://www.leggetter.co.uk/real-time-web-technologies-guide )
>
> Hopefully this gives some useful information or things to think about.
> Scaling realtime
> architecture is kind of hard (not impossible, but can be a pain in the
> ass).
>
> Regards,
> Micheil Smith
> --
> BrandedCode.com
>
>

[nodejs] [ANN] node in process cache proposal

2012-05-08 Thread jason .
connect-redis is very slow. I can't optimize it too much

here is my test

none-session: RPS: 5k

connect-redis: RPS: 2.1k

fake redis session: `function(req, res, next) { redisClient.get('foo',
next) }`
RPS: 3.7k

connect mem session is deprecated, and it also slow
RPS: 3.2k

I think connect-session is a little complex after I read the code.

For a production environment, we can use a hash load balance, same user
will always goes to same process, so we can use in process cache as
session, and this cache module will not only use for session, it could also
help on real time service like chat and game.

Here is my proposal for in process cache.

1. TTL or LRU
2. store as primitive type not string.
3. use a native module, can use more memory than v8 limitation.

I hope this could be apart of node.js.

I don't know are there any existing modules like this?

-- 
Best regards,

桂林 (Gui Lin)

guileen@twitter
桂林-V@weibo 
guileen@github 

-- 
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


Re: [nodejs] Re: Connection model for Mongo using Node.js

2012-05-10 Thread jason .
https://github.com/kissjs/node-mongoskin

2012/5/11 James O'Reilly 

> I just want to add to Alexey's list, Mongoose (http://mongoosejs.com/) is
> another good option.
>
>
> On Thursday, May 10, 2012 10:07:57 AM UTC-4, Alexey Petrushin wrote:
>>
>> You should reuse existing connection, i.e. call `open` in initialization.
>> Also there are lots of wrappers that make API of MongoDB Driver more
>> friendly and remove some of callbacks like mongoskin, mongojs or
>> http://alexeypetrushin.github.**com/mongo-lite
>>
>
>  --
> 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
>



-- 
Best regards,

桂林 (Gui Lin)

guileen@twitter
桂林-V@weibo 
guileen@github 

-- 
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


[nodejs][ANN] mongoskin release 0.3.6, by kissjs.org

2012-05-15 Thread jason .
mongoskin  release 0.3.6, by
kissjs.org

0.3.6

* fix for node-mongodb 1.0.x

mongoskin is a wrapper for node-mongodb.

if you know how to use node-mongodb, you will learn mongoskin in 5 minutes.

var db = require('mongoskin').db('localhost/testdb?auto_reconnect');
> db.bind('user');
>


db.admin.listDatabases(function(err, result){
>
console.log(result);

});



db.user.find({}, {limit:10, sort:[['created', -1]]}).toArray(function(err,
> users) {
> console.log(users);
> })
>


db.user.find().limit(10).sort({created:-1}).limit(10).toArray(function(err,
> users){
> console.log(users);
> })



https://github.com/kissjs/node-mongoskin

-- 
Best regards,

桂林 (Gui Lin)

guileen@twitter 
桂糊涂@weibo 
guileen@github 

-- 
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


Re: [nodejs] Re: JSON5: modern JSON

2012-05-28 Thread jason .
Like it.

2012/5/28 Arunoda Susiripala 

> I like this.
> Definitely I'll use this in my config file.
> Hope nconf would add this into the core :)
>
>
> On Mon, May 28, 2012 at 8:07 PM, Aseem Kishore wrote:
>
>> Definitely guys -- thanks for the feedback and for the discussion.
>>
>> Chicken-and-egg problems are always hard. As an attempt to make JSON5
>> more feasible, I've purposefully made stringify() output regular (strict)
>> JSON.
>>
>> So existing tools could continue to write regular JSON; it's just my hope
>> that for cases where JSON needs to be written or edited by hand, tools be
>> flexible in reading JSON.
>>
>> And yes, I thought a great guiding principle was to continue to be valid
>> JS.
>>
>> Aseem
>>
>>
>> On Mon, May 28, 2012 at 10:26 AM, Angel Java Lopez > > wrote:
>>
>>> Well, I see a value: compatibility with eval.
>>>
>>> That should be the key for this project: it's not "another markup
>>> language". It's plain Javascript (wo/need eval)
>>>
>>> Initially, I had the idea to suggest:
>>>
>>> {
>>>mypage = 'loret
>>>  ipsum...
>>> ...
>>>'
>>> }
>>>
>>> that is, multiline string, where the end of line (without \ at end) were
>>> preserved when loaded. But then I realized that feature would break eval
>>> semantic
>>>
>>>
>>> On Mon, May 28, 2012 at 11:19 AM, Nuno Job wrote:
>>>
 While I appreciate your work I would like to ask if you think the
 advantages of these additions are enough to justify:

 1) The added complexity
 2) Changing the semantics of something already completely defined and
 with a very large tools ecosystems around it.

 In other words, markups are cool but maybe this is not JSON? :) Funny
 that someone said it might be YAML (yet another markup language) :)

 Anyway, kudos on great OSS work!

 Nuno


 On Mon, May 28, 2012 at 3:13 PM, Aseem Kishore >>> > wrote:

> Great question. I actually didn't know until after I published this
> that YAML is a superset of JSON. Other than that, I didn't really consider
> YAML only because it doesn't seem to have very good uptake in JS-land.
>
> Looking at it a bit now, though, I think there might be some value in
> incremental improvements to JSON, where the syntax is still valid
> JavaScript, rather than a different and much larger syntax.
>
> Aseem
>
> On Mon, May 28, 2012 at 10:08 AM, Vitaly Puzrin wrote:
>
>> Why not to just use YAML :) ?
>>
>> понедельник, 28 мая 2012 г., 6:32:23 UTC+4 пользователь Aseem Kishore
>> написал:
>>
>>> I love JSON, but writing it by hand has always been a pain.
>>>
>>> Needing to (double-)quote keys, not being able to document the data
>>> with comments, and not having support for trailing commas or multi-line
>>> strings -- all of which are available and work perfectly well on modern 
>>> ES5
>>> engines, including Node.
>>>
>>> After stewing on this for over a year, I bit the bullet today and
>>> made this idea a reality: a "JSON5" parser that supports these and other
>>> ES5 features in JSON.
>>>
>>> https://github.com/aseemk/**json5 
>>>
>>> It's built off of Douglas Crockford's own eval()-free JSON parser,
>>> and it's available now on npm as "json5".
>>>
>>> I'd love to get your guys' thoughts and feedback on this. And it'd
>>> be a dream if package.json files could be written in this looser syntax 
>>> one
>>> day. =)
>>>
>>> Cheers,
>>> Aseem
>>>
>>>  --
>> 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
>

  --
 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 u

Re: [nodejs] Re: JSON5: modern JSON

2012-05-28 Thread jason .
I hope JSON can support Date type serialization, but it not, now I hope
JSON5 can do this Date serialization.

2012/5/29 Vitaly Puzrin 

> Who cares about difficulty of writing parser, if it already exists for
> node? Who makes you use every yaml feature? Yaml is widely used in
> ruby/python. And i'm not sure, that it would be clever idea to invent
> another way for node. Every time i look into package.json, i remember about
> dying kittens.
>
> понедельник, 28 мая 2012 г., 21:28:07 UTC+4 пользователь Matt Sergeant
> написал:
>>
>> The problem with YAML is it's a horrendously bloated spec, making it
>> super complex to write a correct parser (unless you shim a C library). It
>> started off as a really simple idea but then Ingy went a bit off the rails
>> with things it could do, and the spec ended up about 10 times longer than
>> the XML spec. Personally I don't like complex formats.
>>
>> Matt.
>>
>>
>> On Mon, May 28, 2012 at 12:29 PM, Vitaly Puzrin wrote:
>>
>>> I'd like like to separate 2 questions. Your work is great, and json
>>> really worth to be improved. For example, it's convenient, when
>>> you need to keep things simple (for very small files), or keep speed
>>> very fast.
>>>
>>> The second question, about bad yaml uptake, is ralated to lack of good
>>> libraries for node.js. Just because project is still young.
>>> Some libs are quite complicated, and takes a lot of time to do. But we
>>> did pyyaml port, and you can play with it here
>>>  https://github.com/nodeca/js-**yaml 
>>> (there is online demo). I can bet, that 
>>> once you start use yaml, you will
>>> newer wish to return back :)
>>>
>>> понедельник, 28 мая 2012 г., 18:13:40 UTC+4 пользователь Aseem Kishore
>>> написал:

 Great question. I actually didn't know until after I published this
 that YAML is a superset of JSON. Other than that, I didn't really consider
 YAML only because it doesn't seem to have very good uptake in JS-land.

 Looking at it a bit now, though, I think there might be some value in
 incremental improvements to JSON, where the syntax is still valid
 JavaScript, rather than a different and much larger syntax.

 Aseem

 On Mon, May 28, 2012 at 10:08 AM, Vitaly Puzrin wrote:

> Why not to just use YAML :) ?
>
> понедельник, 28 мая 2012 г., 6:32:23 UTC+4 пользователь Aseem Kishore
> написал:
>
>> I love JSON, but writing it by hand has always been a pain.
>>
>> Needing to (double-)quote keys, not being able to document the data
>> with comments, and not having support for trailing commas or multi-line
>> strings -- all of which are available and work perfectly well on modern 
>> ES5
>> engines, including Node.
>>
>> After stewing on this for over a year, I bit the bullet today and
>> made this idea a reality: a "JSON5" parser that supports these and other
>> ES5 features in JSON.
>>
>> https://github.com/aseemk/**json5
>>
>> It's built off of Douglas Crockford's own eval()-free JSON parser,
>> and it's available now on npm as "json5".
>>
>> I'd love to get your guys' thoughts and feedback on this. And it'd be
>> a dream if package.json files could be written in this looser syntax one
>> day. =)
>>
>> Cheers,
>> Aseem
>>
>>
>>>  --
> 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
>



-- 
Best regards,

桂林 (Gui Lin)

guileen@twitter 
桂糊涂@weibo 
guileen@github 

-- 
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


Re: [nodejs][ANN] siege.js by kissjs.org publish 0.0.2

2012-05-30 Thread jason .
I forgot add an example for it.

siege()
.host('localhost')
.on(3000)
.get('/')
.attack();

2012/5/29 Osher El-Netanany 

> What can we do to add the ability to siege an external server?
> I mean - instead of providing app.js - I want to provide a base URL to an
> exteranal server.
>
> Do you think it is simple to add? :)
>
> On Sun, May 6, 2012 at 7:04 PM, jason.桂林  wrote:
>
>> siege.js is a http benchmark module.
>>
>> features:
>>
>> * benchmark with keep alive connection, (useful on mac os)
>> * colorful report
>> * multiple task define
>> * cookie support (>= 0.0.2)
>>
>> example:
>>
>> siege()
>>>   .on(3000)
>>>   .for(1).times
>>>   .get('/')
>>>   .attack()
>>
>>
>> for a nodejs app.js, which module.exports = function(req, res), you can
>> use siege start your server, before benchmark, and close server after
>> benchmark.
>>
>> siege(__dirname + '/app.js')
>>>   .on(4000)
>>>   .withCookie
>>>   .for(1).times
>>>   .concurrent(100)
>>>   .get('/set-cookie')
>>>   .get('/get-cookie')
>>>   .get('/').withoutCookie
>>>   .attack()
>>
>>
>> enjoy it.
>>
>> by kissjs.org.
>>
>> We are looking for collaborators.
>> --
>> Best regards,
>>
>> 桂林 (Gui Lin)
>>
>> guileen@twitter
>> 桂林-V@weibo <http://weibo.com/guileen>
>> guileen@github <https://github.com/guileen>
>>
>>  --
>> 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
>



-- 
Best regards,

桂林 (Gui Lin)

guileen@twitter <https://twitter.com/#!/guileen>
桂糊涂@weibo <http://weibo.com/guileen>
guileen@github <https://github.com/guileen>

-- 
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


Re: [nodejs][ANN] siege.js by kissjs.org publish 0.0.2

2012-05-31 Thread jason .
Good suggestion.

2012/5/31 Matt 

> .on()?
>
> That's rather confusing considering how much .on() is used in Node for
> event emitters. I assume you mean .port()?
>
>
> On Wed, May 30, 2012 at 3:45 AM, jason.桂林  wrote:
>
>> I forgot add an example for it.
>>
>> siege()
>> .host('localhost')
>> .on(3000)
>> .get('/')
>> .attack();
>>
>> 2012/5/29 Osher El-Netanany 
>>
>>> What can we do to add the ability to siege an external server?
>>> I mean - instead of providing app.js - I want to provide a base URL to
>>> an exteranal server.
>>>
>>> Do you think it is simple to add? :)
>>>
>>> On Sun, May 6, 2012 at 7:04 PM, jason.桂林  wrote:
>>>
>>>>  siege.js is a http benchmark module.
>>>>
>>>> features:
>>>>
>>>> * benchmark with keep alive connection, (useful on mac os)
>>>> * colorful report
>>>> * multiple task define
>>>> * cookie support (>= 0.0.2)
>>>>
>>>> example:
>>>>
>>>> siege()
>>>>>   .on(3000)
>>>>>   .for(1).times
>>>>>   .get('/')
>>>>>   .attack()
>>>>
>>>>
>>>> for a nodejs app.js, which module.exports = function(req, res), you can
>>>> use siege start your server, before benchmark, and close server after
>>>> benchmark.
>>>>
>>>> siege(__dirname + '/app.js')
>>>>>   .on(4000)
>>>>>   .withCookie
>>>>>   .for(1).times
>>>>>   .concurrent(100)
>>>>>   .get('/set-cookie')
>>>>>   .get('/get-cookie')
>>>>>   .get('/').withoutCookie
>>>>>   .attack()
>>>>
>>>>
>>>> enjoy it.
>>>>
>>>> by kissjs.org.
>>>>
>>>> We are looking for collaborators.
>>>> --
>>>> Best regards,
>>>>
>>>> 桂林 (Gui Lin)
>>>>
>>>> guileen@twitter
>>>> 桂林-V@weibo <http://weibo.com/guileen>
>>>> guileen@github <https://github.com/guileen>
>>>>
>>>>  --
>>>> 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
>>>
>>
>>
>>
>> --
>> Best regards,
>>
>> 桂林 (Gui Lin)
>>
>> guileen@twitter <https://twitter.com/#!/guileen>
>> 桂糊涂@weibo <http://weibo.com/guileen>
>> guileen@github <https://github.com/guileen>
>>
>>  --
>> 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
>



-- 
Best regards,

桂林 (Gui Lin)

guileen@twitter <https://twitter.com/#!/guileen>
桂糊涂@weibo <http://weibo.com/guileen>
guileen@github <https://github.com/guileen>

-- 
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


[nodejs] [ANN] mongoskin@1.3.20-alpha published refctor mongoskin

2014-02-15 Thread jason .
Mongoskin has refactored, the version number will keep same with
node-mongodb-native.

Mongoskin is a wrapper of node-mongodb-native.

Let me know if you have any advices for new version mongoskin.

project home: https://github.com/kissjs/node-mongoskin

-- 
Best regards,

桂林 (Gui Lin)

guileen@twitter 
桂糊涂@weibo 
guileen@github 

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [nodejs] Re: preserve color when execute shell commands in windows

2014-03-29 Thread jason .
I have the same question.

But I can't use the this solution, is it possible to make the stream of
spawned program mock as stdio.

I am interesting with how the CLI programs determine whether the stdout
stream is support colors?

Is it possible node "cheat the spawn" with the colors support like what a
terminal does.


2011-12-31 1:40 GMT+08:00 Nathan Rajlich :

> You're welcome ;)
>
>
> On Thu, Dec 29, 2011 at 8:02 PM, Prabir Shrestha  > wrote:
>
>> Answer at http://stackoverflow.com/a/8671997/157260
>>
>> this code seems to preserve the color.
>>
>> var spawn = require('child_process').spawn
>>   , command = 'C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\MSBuild
>> c:\\test.sln'
>>   , cmd= spawn('cmd', ['/s', '/c', command], { customFds: [0,1,2] });
>>
>> cmd.on('exit', function(code){
>> console.log(code);
>> });
>>
>> --
>> 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
>



-- 
Best regards,

桂林 (Gui Lin)

guileen@twitter 
桂糊涂@weibo 
guileen@github 

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[nodejs] How to convert iLBC, amr, speex audio stream in realtime?

2014-04-30 Thread jason .
Hi folks:

I have some question about audio.

Base on the information from internet, android is not support iLBC unless
use 3rd-party library, but it support AMR, iPhone is not support AMR.

So, when I want to make a realtime talk app, I must convert audio for
android or iPhone.

I want do this convert at server side. I have design the API :)

srcAudioStream.pipe(audioConvert('ilbc', 'amr')).pipe(destAudioStream)

Any module can make the `audioConvert` ?

-- 
Best regards,

桂林 (Gui Lin)

guileen@twitter 
桂糊涂@weibo 
guileen@github 

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.