Archive

Archive for the ‘Web’ Category

Should we trust IIS for WebSocket ?

December 21, 2012 Leave a comment

IIS 8 has already support WebSocket as I mention previously in my blog post. But I take a look at my notes again and see that there is a problem with IIS for maintaining long running service. I’m not familiar with IIS internal structure and still learning about that lately.

The problem is in IIS Recycle.

Here’s a couple discussion from NServicebus mailing list about that.

image

 

image

 

Here’s from another blog.

http://weblogs.asp.net/dwahlin/archive/2008/06/16/pushing-data-to-a-silverlight-client-with-wcf-duplex-service-part-i.aspx

Take a look at the first commenter

Monday, June 16, 2008 11:23 PM by Rob Eisenberg

Just for the record…this type of HTTP push technique is often referred to as Comet.  The real question is, how scalable is the server going to be?  From everything I’ve been able to determine, it’s pretty much impossible to build a scalable Comet server for IIS.  This is due to the way connections and threads are handled.  I’ve tried to get some information from Microsoft about this, but they don’t have answers yet.  Only time/experimentation will tell if the server is scalable enough to build a multi-player game or chat application.  I’m hopeful, because the amount of work it takes to create a truly scalable socket server is tremendous.

I track it down from Udi Dahan blog post

http://www.udidahan.com/2008/07/30/scaling-long-running-web-services/

image

You also quickly notice that is the reason why publishing message from the web server is a bad idea after dig deeper into NServiceBus.

http://www.udidahan.com/2010/02/01/nservicebus-2-0-release-candidate-2-available/

image

 

The mostly used websocket server in .NET is SuperWebSocket. I see a interesting discussion about should we host websocket server into IIS or standalone windows service.

http://superwebsocket.codeplex.com/discussions/338277

You’d better deploy it as a Windows Service. Because if you host it in IIS, you don’t know when the IIS will recycle the application pool.

 

So ? What do you think ?

 

Cheers

Categories: IIS, Web, WebSocket

Ajax – Comet – Push Client Browser

July 10, 2010 Leave a comment

Ajax pada dasarnya hanya dapat melakukan request ke Server. Bagaimana jika Server pengen kirim sesuatu ke client… Apakah itu mungkin? Ke browser? dari Server kirim ke browser? Heh?

Contoh dari push client tersebut diterapkan oleh facebook (untuk notifikasi n chat) dan gmail untuk web chat.

Comet adalah solusinya….

Sebenarnya gak ada yg istimewa sekali atau benar2 baru dari model ini. Yg dimanfaatkan hanyalah spesifikasi HTTP tersebut. Koneksi http tersebut ditahan untuk beberapa waktu sehingga response dapat dikirim melalui koneksi yg terbuka tersebut.

Untuk lebih memahami model dengan menggunakan comet ini berikut adalah resource untuk belajarnya :

Comet Programming

New Approach to Ajax Application

Comet server framework

Responsive Ajax App With Comet

Comet n PHP

Comet dengan PHP n CodeIgniter

Comet with DWR and Jetty

Comet and Reverse Ajax: The Next-Generation Ajax 2.0 (Firstpress)

Selain dengan menggunakan comet ada teknik2 lain seperti dengan BOSH. Model BOSH ini sering digunakan dengan XMPP server (chat server). HTML5 juga bakal mendukung hal ini yaitu dengan Web Socket.

Categories: Ajax, Web Tags: , ,