Node JS Doubt on it’s Threaded Model

Node JS claimed using single threaded model, asynchronous, easily handle thousand concurrent HTTP request with efficient memory consumptions.

But underlying not. It does create internal threads from the main event loop thread using select calls.

For *nix based it creates fixed size thread pool, 4 threads.

Having one doubt:
Don’t say networking IO, it does consumes singke thread to do async IO.
But how File IO, it should utilize thread pools or OS level thread or process to read/write buffer. When dealing with large file, say, thousand concurrent requests to read large file, will 4 threads need to queue in order to process all read large file requests, then how the Node JS performance can be.

Nevertheless, Node JS really suitable to implement lightweight things like socket IO for soft real time, communication apps, the “front end” of the back end system, like API Interface, which is blazing fast, non blocking.

But it is not suitable for heavy business calls, like expensive large file read/write, complex database transactions like money transfer from one bank accounts to another, or any other data extensive operations.

Hello world on an open source SIP server

I just built an open source SIP server Kamailio and run on my personal server. And I am trying to find some open source IVR or media server that I can configured to this SIP server, and I found Voxeo which is quite powerful, support VXML and CCXML, that is not open source but it is a cloud platform. I configured a SIP number on Kamailio which can routed to Voxeo application when being called.

Just first learned VXML to code the IVR call flow by hand. Using Node.JS to host the VXML file which resided on my server and configured Voxeo to call it. A lot of possibility when VXML can do with Node.JS like WebSocket request to Agent browser screen when IVR call comes, and agent can provide some answer and then media server will playback it to the customer in calls.

Still finding a real open source IVR or media server that can installed on my server. But I know I could not getting the awesome Nuance without giving any fee.

The next I want to achieve is the ability to establish the calls from Google Chrome via WebRTC Link to my SIP Server, maybe via WebSocket, but the challenge is the compatibility of WebRTC’s RTP session link with SIP media server where the actual voice packets transmitted over the calls. If this part of compatibility becomes mature, then there is another chance for call centers for this lower cost SIP client solution.

Optical Point of View in Lady in the lake – glass

这部电影,2分钟多,特别之处就是全过程采用第一人称视角拍摄。想想看这要如何拍摄呢,看,男主角要躲在摄影师背后,或者他就是摄影师,途中他还有伸出手递东西给女主角。摄影师的技巧在这里显得非常重要。因为他的职责不象其他电影需要很稳定的样子,他需要造成那种看了就会头晕的样子才会比较真实。

这在以后,有了 Google Glass,第一人称视角拍摄将会变得非常自然。有了 Google Class,更多人会有第一人称视角拍摄眼前发生的事物和交谈,然后上传到 Youtube,分享到 Facebook,到那时肯定会激起拍摄第一人称视角视频的风潮。

如果说有了智能手机 iPhone / Samsung Galaxy,每一个人摇身一变变成了 Photographer,那么有了 Google Glass,每个人都能变成 Videographer. 这是一个新科技所带来的新变革。

世界一直在变,有人说 Google Glass 不好用,很麻烦,有人却说很好用,很方便,见仁见智。这要看 Google 如何发展这个产品了,以便不会落到在未来被关闭的命运。

更多内容参考 Google Glass and the Rise of POV.

Updated Titanium Studio / Xcode / iOS SDK

Updated Titanium Studio to 3.1.0 and Xcode to 4.6.2, IOS sdk to 6.1.3…
The update step is as follows:
1) Download latest titanium studio and install, maintain your current projects and settings.
2) Download latest Xcode from App store and install.
3) Open titanium studio, open existing project, clean and rebuild.
4) Open xcode, open generated project, then deploy to your device.

Tips: Currently no way to separate download iOS SDK, as it is bundled with Xcode.
With latest version of Xcode, it is easier to just update in App Store to update your Xcode with iOS SDK. It is recommended also to download Xcode and iOS together for best development experience.

Very sad this happened in my country Malaysia

Almost 3 weeks, the sad things happened again and again in my beloved country, Malaysia. Recently, the war is happened at Sabah as Sulu Terrorists from Philippine entered illegally to Sabah’s small town and several Malaysian Police been killed.

Many years we think our country is the best in the world, we have no wars, have no natural disasters, our country is very safe. But, this is not true now. Sabah is so easily let Sulu Terrorists come into it.

The information from Sabah is not fully clear, it stills hard to get the latest information from there. Based on the current information, I think Najib government is doing the best in this process, which is reasonable action, from negotiation with the Sulu, and now, banishment.

However, I don’t like to bring in political sentiment to this issue. As election is almost to come, it is very dangerous if someone try to link this issue to politic. It is very sad some of the messages on Facebook is posted by non-matured people, they don’t know the history, laws, they are not using rightly their brain to analyse the issue first before posting. They blame why government send policeman but not military to Sabah, they blame the policeman that always ask coffee money (corruption) but didn’t aware of because of them we can still safely live in our house and log into Facebook. As most of us live in West of Malaysia but our heart is linked together with the people who live in East Malaysia.

Few hours ago read from Malaysiakini.com/cn, Najib wants police to investigate if opposition party is involved in this issue because of the election. This is a very dangerous if this issue is related to our politics, or someone try to link this issue to politic. We should solve this issue quickly, let Sulu and others illegal foreigners get out from our country before to get who should be responsible for this issue. If need to judge now, the most responsible party is Najib government. But if they try to smear the opposition party by framed them involved in this issue in order to achieve their political objective, this is very dangerous and irresponsible.

As the people of Malaysia, the current government gained my respects in first place, but now it started losing my confidence as the decisions and actions made, as more and more people be sacrificed now. We even ask hoarsely, when our country can be safe again.

However, no matter happened this issue will not affect my stands in next election, we must CHANGE the government now.

I love this country, Malaysia.