I am writing Java2Script’s Google Talk, and it uses a mode of continuation (also known as “Comet” application). In order to implement continuum data transfer between browser and server ( Tomcat in the backend ), I kept the HTTP connection blocked waiting for data to be available. In the middle, Apache httpd server is used and mod_jk is used to connect the two server.
But I met a ridiculous problem between servlet container and http server. When the browser is assigned to connect servlet directly, it can obtain data from the connection, but it can not obtain a bit when it is piped through Apache httpd server.
I tried to add “Transfer-Encoding: chunked” or “Content-length: 0” but with no helps. And I modified jk.conf with “JkOptions +FlushPackets”, still with no helps. Finally, I remove a line of “writer.flush();” from my servlet source, and things all went correctly.
The line of “writer.flush();” was located in the the line when there is no data written to the response. And I considered that when there are no data in the response, calling flush method will hang mod_jk connector up. And the whole later data transfer will be disturbed.
More details about mod_jk, I recommend you to read “Tunning apache and tomcat for web 2.0 comet application“.
Finally I found out that “JkOptions +FlushPackets” works for me. #flush method problem is a fake problem. Only after I restart both Tomcat and Apache server do “JkOptions +FlushPackets” begin to work.
Ya, these days were very busy.
I had spent more than a month on rewriting Java2Script Google Talk. And today, it was almost finished. You can check it out right now.
More works are required to make it robuster and faster. Maybe Java2Script Google Talk will be publicly released in the next week.
And next release of Java2Script is on the way too. It will be a 1.0.0 RC release. Four months was a long long time since last release.
Finally, I realized that ideas is much less important than executing.
You may have some brilliant ideas, but you can’t work it out? Or you can’t make your guys to work it out in a short time? You ideas will wane away.
Colleague is much important for both company’s future and one’s job career. To choose a company, one must also take partners as a factor that one should consider.
Smart people should not spend their times trying to fix the bugs left by normal or dummy people. Or your times will be wasted.
In Steve Pavlina’s article 10 Weaknesses of Human Intelligence, he mentioned one thing:
Poor networking capabilities – Transferring data between two human minds is slow, tedious, and error-prone, and the protocols are beyond confusing. It’s a safe bet that Microsoft is involved.
It is not mentioning “Microsoft” the reason I quoted his thoughts. I think not only Microsoft is trying to improve the capabilities for transferring data between two human minds, lots of other companies are also devoting in such works. For example, QQ (tencent.com in China), MSN, AOL, Google Talk and other instant messenger company are trying to help people communicate with each other. And these days, lots of social network websites are online helping people to have a better relationship online or offline. I could say that this is a big direction for IT future.
And I am thinking about in which ways there are needs of innovations for transferring data between two human minds. IMHO, some big companies may already be on their ways.