Eclipse Plugin Central Website, Aweful Design!

If you ever visit Eclipse homepage http://www.eclipse.org/, you may notice that Eclipse homepage embeds plugin updates news from Eclipse Plugin Central (http://www.eclipseplugincentral.org/). If you try to visit the news by the given link, you may find that the page loads very very very SLOW!

Why? Open the the page source, you will see that it generates all 900+ plugins in the source! And the *.html file size is up to 200+k. And worse thing is that every page in Eclipse Plugin Central is the same with 200+k HTML file! Every page!

Besides it was once hacked by someone and its functions were buggy, such 200+k HTML pages design in Eclipse Plugin Central must be listed as #1 of aweful designs that I have ever seen.

Posted in Uncategorized | Comments Off on Eclipse Plugin Central Website, Aweful Design!

AJP Connector Breaks Down Apache HTTP Server

Recently, my Apache HTTP server was broken down twice. The scenario was when visiting a page, it was just waiting there, blank. And I checked the server through SSH and saw that there was a lot (about 50) of inner 8009 connections. After restarting Apache HTTP Server and Tomcat Server, these connections decreased to less than 10 connections.

Yes, I deployed Comet applications “Google Talk in JavaScript” and “MSN Live in JavaScript” on my server. Here is the connection routine:

Client <-Kept Connection-> Apache HTTP Server <-AJP Connector (8009 Connection)-> Tomcat

When a user is connected, an AJP Connector is setup for him/her. The connection will not be tore down until the user disconnects from Gtalk or MSNLive service. So if there are more than 50 users online, there are no doubts that the server crashes.

To solve this problem, one solution would be not using Apache HTTP Server in the middle of Tomcat server and browser client. So there is no limitation on AJP connections.

And another solution would be monitoring user connections on Tomcat server side, and if there are more than 50 connections, try to switch application’s Comet-mode into Query-mode smartly.

Providing Comet applications need to solve a lot of unknown problems.

Posted in Comet, Google Talk, httpd, Tomcat | 1 Comment

Winmail.dat in Thunderbird

I am puzzled a lot when I got emails with winmail.dat attachment, which is unknown file type attachment in my Thunderbird. Here is the solution for this annoying winmail.dat:

Go to https://addons.mozilla.org/en-US/thunderbird/addon/4433, follow it instructions to download the “LookOut” add-on for Thunderbird, and attached files inside winmail.dat will be listed and be recognized and be opened with existed programs.

Posted in Uncategorized | Comments Off on Winmail.dat in Thunderbird

Challenging Myself: Find 1st k-Digits Prime Number

Here is a task to challenge myself: Find the first k digits prime number. And k would be 16, 32, 64, 256, 1024, 8096, 65536, or even bigger.

And the most challenging thing would be most of key calculations will be performed in JavaScript engine hosted inside browsers. And a distributed algorithm will be designed. Algorithm which is similar to Google’s Map/Reduce will be designed. And Apache Hadoop’s Map/Reduce is also in references.

Any comments about this challenge? Or join me to design the algorithm! Or join the distributed computing game.

Keep tuned for how big the number k would be!

PS: After searching around Internet for existed prime number theories, I find out that k=16 is already a challenge for me! There are algorithms to find prime number in format of 2^p+1, whose digits may be bigger than 1000000. But there are not the 1st k-digits algorithms. According to theories, I should have to find out all prime numbers less than given n. But the count of prime numbers less than n is about n / ln (n), which is huge number already for k=16! So my first challenge would be 16.

Posted in AJAX, Challenge, Java, JavaScript | Comments Off on Challenging Myself: Find 1st k-Digits Prime Number

Google Talk Client’s Java SWT Desktop Copy

Actually, Google Talk Client’s Java SWT desktop copy is the original source for Google Talk Client’s JavaScript copy.

And now it is available for download. Please take a trial.

Sources of Java2Script Google Talk will be available in the next week. Keep tuned.

Posted in AJAX, Google Talk, Java, Java2Script | 8 Comments

Debug into rt.jar

If you ever use Eclipse trying to debug into Java’s system APIs, such as java.lang.String or java.math.BigInteger, you may find that even you can step over or step in, or have the correct source file open and the correct line of codes highlighted, you still could not see the local variables’ value and method’s parameters are shown in pattern of “arg0”, “arg1” and so on.

Yes, you are already using JDK instead of JRE. But you still have the above problem. What’s wrong? It’s not a bug of Eclipse. It is all about the rt.jar along with the JDK (1.5 or 1.6). In Sun’s official JDK release, debug symbols are already packed into the rt.jar. But local variables’ debug information is not packed. Sun may consider that it is not OK to includes those local variables’ debugging information. That is the source of problem.

To solve this problem, you may need to upgrade to JDK 1.6. Download DEBUG jar file from
http://download.java.net/jdk6/binaries/
Double click it to install a new JDK. And configure your Eclipse to use the new JDK.

For JDK 1.5, recompiling rt.jar by yourself, or other information, please visit
http://forums.java.net/jive/thread.jspa?threadID=399&tstart=0
for a detailed discussion.

Posted in Debug, Java | Comments Off on Debug into rt.jar

Google Talk Client’s JavaScript Copy

http://demo.java2script.org/gtalk/

Here is the screenshot:

Click for Large Screenshot: Google Talk Client’s JavaScript Copy

En, in beta …

Posted in AJAX, Google Talk, Java2Script | 5 Comments

Ridiculous mod_jk Problem with Flush Method

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“.

Update:
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.

Posted in AJAX, httpd, Tomcat | Comments Off on Ridiculous mod_jk Problem with Flush Method

Busy Days on Java2Script Google Talk

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.

Posted in Google Talk, Java2Script | 2 Comments

Executing is VERY Important

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.

Posted in Project Management | Comments Off on Executing is VERY Important