Blog post by Saurav Mohapatra
The first version of Dimdim was (and the conference server part of the current version still is) a java web application running in Tomcat. We’ve slowly been moving towards more native components in our server stack on a case by case basis. Not to be drawn into Java vs. Other server tech debates, this move is a part of a growing consensus about leveraging the OS provided capabilities to the fullest to achieve high throughput, optimal performance while balancing that out with development cost / learning curve.
For our latest feature, the Screen share capability, we switched to a C++ based FastCGI application behind the NGINX webserver.
The move was done after a lot of thought and exploration. For the traffic pattern of something like desktop sharing, the current java technologies simply did not add up. A typical screenshare traffic pattern transmits around 1-2 mb of data for a 1280 X 1024 for per minute of share for something “heavy” like Powerpoint slide show or Full screen image viewing. Thus we switched to a robust native technology server. The app was written using FastCGI technology and first version ran behind the lighttpd server. As we continued testing, we found better performance especially for longer duration shares with the NGINX web server and thus that was chosen finally as the front server for the desktop screencasting application.
We built on top of the tried and trusted RFB protocol of VNC adding HTTP/S communication layer using libcurl for publishing the desktop stream.
The viewer was adapted from FVNC code base from OSFlash and we added tight encoding to it along with HTTP/S communication layer.
The point I’m trying to make here is that we built on top of existing robust components and application and were able to achieve significant progress in a shorter duration than if we’d have developed the whole thing from scratch.
Now this whole exercise kind of paraphrases and proves what I have always believed about open source. It is an organic philosophy, perhaps one of the best displays of the most positive sides of human nature. You build something based on stuff that someone has been built before and others after you will use the stuff you’ve developed to build their own.
It is a really wonderful philosophy and in this geek’s opinion perhaps one of the best ways to live life.