`
sillycat
  • 浏览: 2503617 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

NODEJS(4)Pick up my node.js

 
阅读更多

NODEJS(4)Pick up my node.js

I used to work with nodeJS, I just tried them on windows machine with a simple File Upload Example. 
Recently, I will be glad to pick it up.

1. Installation of NodeJS
>python -V
Python 3.4.0

I do not know if this will do, but my python version is 3.4.0.

I get error message even when I am doing the configure command.

I need to downgrade my python to 2.7.6 https://www.python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz

>tar zxvf Python-2.7.6.tar.xz
>./configure --prefix=/Users/carl/tool/python-2.7.6
>make
>make altinstall

>sudo ln -s /Users/carl/tool/python-2.7.6 /opt/python-2.7.6

>python -V
Python 2.7.6

Here is my python version now.

Fetch the right version of nodeJS
>wget http://nodejs.org/dist/v0.10.28/node-v0.10.28.tar.gz

Unzip the file and try to install it.
>./configure --prefix=/Users/carl/tool/node-v0.10.28
>make 
>sudo make install

>sudo ln -s /Users/carl/tool/node-v0.10.28 /opt/node-v0.10.28
>sudo ln -s /opt/node-v0.10.28 /opt/node

So latest nodeJS is there and running
>node -v
v0.10.28

Then try to run my old nodeJS project in easynodejs.
>npm install formidable
>node index.js

Single CPU, socket 17000 qps, http 4400 qps, Memory 30-40m, the bottle neck will be CPU.

node.js is not suitable for these items>
CPU working
Simple CRUD/HTML apps
DB complex, business logic complex, validation complex
Big J2EE

It is suitable for these items>
real time app
high request, data is small
IO working, not CPU working

Some Open Source Examples
Log.io
Nexe



References:
http://sillycat.iteye.com/blog/1453848
http://sillycat.iteye.com/blog/1460938
http://sillycat.iteye.com/blog/1462736

Tips
http://www.infoq.com/cn/articles/what-is-nodejs
http://www.infoq.com/cn/news/2011/09/nodejs-async-code
http://www.tbdata.org/archives/1285
http://blog.csdn.net/zzulp/article/details/8111427   Core Modules
http://blog.csdn.net/zzulp/article/details/8114540   Recommend Modules
http://www.csser.com/board/4f3f516e38a5ebc97800050c System Info
http://cnodejs.org/topic/4f97d5b8407edba2146030dd why we use nodejs

Geddy
https://github.com/geddy/geddy
Express
http://expressjs.com/

http://www.nodejs.org/api/
http://nqdeng.github.io/7-days-nodejs/

List of nodeJS projects
https://github.com/joyent/node/wiki/Projects,-Applications,-and-Companies-Using-Node

Blog Sample
https://github.com/mehfuzh/lighter
Memcache Sample
https://github.com/dalssoft/memcached.js
APNS
https://github.com/adamvduke/node-apn-server
REST SERVER API -IMAGE
https://github.com/caraboides/nodeIM
Nodejs redis wiki
https://github.com/gjritter/nodewiki

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics