Today a customer asked me if Lightstreamer works on Firefox 3.0 beta 5. I had tested previous beta versions of Firefox 3.0 but not yet beta 5. I was so impressed with its scalability (in terms of concurrent Comet sessions opened on multiple tabs) that I had to write this musing.
Basically, I was able to open 32 instances of the Stock List Demo on 32 tabs, with no significant slackenings. I stopped, but I could definitely open many more. [I did this test on a local network. Connecting to our server from the Internet could be slower. Does anybody feel like doing this test, that is, opening more tabs until the browser hangs? If so, Install Firefox 3.0, put "http://app.lightstreamer.com/StockListDemo/" in your clipboard, then start typing control-t,control-v (or command-t, command-v for Mac users of course), Enter. Please comment below on the results].
This test is possible because Lightstreamer does not suffer from the 2-connection limit. Multiple instances of a Comet application or even different Comet applications connecting to the same server can automatically share the same physical connection. In fact, after opening these 30+ instances, a netstat confirmed that one single socket was opened to the server.
Notice that this Stock List Demo is configured with a bandwidth limit of 30 kbits/s for the Comet socket. This means that all the instances will share this bandwidth limit. After opening many instances, you should notice a reduction in the update frequency (notice I said frequency reduction, not delivery delay. This is a key point of Adaptive Streaming and Congestion Control. In other words, you will see less updates, not old/delayed updates. I will probably return on this topic in a future article).
Besides, notice that each instance does its own subscriptions, that is, only the Comet channel is shared, while the subscriptions are completely independent. This is useful because each application could want to subscribe to the same items with different schemas and/or with a different quality of service (in terms of frequencies, buffering, etc.).
Let me know your thoughts.