10 月 042016
 

Source: NodeJS Server to Linux Service Daemon 製作教學

Linux 系統中的服務,通常都是以 Daemon 的形式存在,Daemon 泛指一種在背景執行的程序,通常可以長時間工作不會中斷。最近剛好要將一個 Node.JS 所設計的系統執行在 Linux 中,由於 Linux 在慣例上會把服務封裝為 Linux Service 並且將啟動器集中在 /etc/init.d 目錄中進行管理。能夠遵循 Linux 的慣例佈署系統是個好方法,免得換了一個人維護就得換顆腦袋。

Continue reading »

7 月 272016
 

Source: Platform detection in your NW.js app

There are various reasons why you might want to detect which platform or operating system your NW.js app is currently being ran on. Your keyboard shortcuts or UI may differ per platform, you might want to store files in platform-specific directories on disk, etc. Thanks to node’s (or io.js’) os module, it isn’t too difficult.

Continue reading »

4 月 152012
 

原文(source): C10k problem – Wikipedia, the free encyclopedia

The C10k problem[1] refers to the problem of optimising web server software to handle a large number of clients at the same time (hence the name C10k – concurrent ten thousand connections). The problem of web server optimisation has been studied because a number of factors must be considered to allow a web server to support many clients. This can involve a combination of operating system constraints and web server software limitations.

Continue reading »