Node.js - Multithreaded Javascript Engine

Ever wondered how to implement multithreading in PHP? Natively, PHP can't do multithreading, only multiprocessing, but multiprocessing on a single resource in PHP is not robust solutions as it could encounter race condition, which is common problem in multithreading if the resource is not locked prior to being used. There are several techniques implementing multithreading in PHP but I'm only mentioning this particular lightweight framework. This is even simplier than ASP.NET inherent multithreading capabilities.

Node.js (http://nodejs.org) is a javascript framework that could even act as a small web server. It allows you to implement multithreading without the hassle of locking/unlocking resources. It could even allow you to design stateful web (equivalent to viewstate/session management). It's even best for designing scalable clustered web app (where several instance resides on same multi-core servers or different servers with load balancer).


No comments:

Post a Comment