Hello everyone,

I'm glad to announce a new release of thread.js.
I have done two major feature in this release.

First, I have implemented a service handler interface that people can write 
their own protocol and user can install it via npm, and I have done a 
simple http service handler and run benchmark with it.

Second, I thought event listener may divide into two categories - dynamic 
event and static event.
Dynamic event listeners mostly used by client applications that they need a 
array to capacity a event and may need a customized event.
On the other hand, almost all server side event listeners should be static, 
they always get only one callback function with a event and never need a 
customized event.
Base on this assumption, I then implement a event listener cache. This save 
a lot of time when event was emitting and go through the object lookup 
process then call the function and it's really gain a huge performance 
boost.

Here is the new benchmark with net module and http module both get a 
connection/sec and a keep-alive request/sec test.
*threadjs uses the simple_http service handler in http module test.


net connection/sec
      node_cluster   node with tj   threadjs
 200  48352          81343          83121
 500  47978          78007          81971
 750  40199          77905          76840
1000  47170          73458          78905
1250  41250          72063          76738
1500  44624          73598          74492
1750  40386          72416          75769
2000  35174          73918          75174

<http://rob333.github.com/thread.js/images/net_conn.png>

net keepalive request/sec
      node_cluster   node with tj   threadjs
 200  173069         297282         383607  
 500  174376         311152         376256  
 750  177343         315716         374010  
1000  178202         296393         365689  
1250  174102         283776         345388  
1500  174480         276573         336369  
1750  171244         266155         319608  
2000  170675         267328         313555  

<http://rob333.github.com/thread.js/images/net_keep.png>

http connection/sec
      node_cluster   node with tj   threadjs
 200  31552          82054          81518
 500  29468          78882          80104
 750  30008          75741          75938
1000  29278          71373          77577
1250  14400          72631          75945
1500  13859          76791          75165
1750  12417          72147          74491
2000  12667          73394          74089

<http://rob333.github.com/thread.js/images/http_conn.png>
http keepalive request/sec
      node_cluster   node with tj   threadjs  
 200  70151          213382         329009
 500  70231          230153         328236
 750  71910          223123         329234
1000  58294          216859         321123
1250  69058          212391         307097
1500  69118          210384         298151
1750  66007          205793         287315
2000  69120          203913         279819

<http://rob333.github.com/thread.js/images/http_keep.png>

Do you think it is useful? Please tell me what do you need or what do you 
think about it.
I was planned to implement timer and process module next.
Cheers.

-Robert


[1] github: https://github.com/rob333/thread.js 
[2] homepage: http://rob333.github.com/thread.js/

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

Reply via email to