XML and Java
In the early 90s, when the Java language was proposed, it was welcome by many people because of its clear structure and safe sandbox. It is not the first Object-Oriented language, but it sure is the first mature OO language. So it's easy to program, and it's easy to maintain too.
Soon people found Java was not a practical language at all. First, user has to download a 10M run-time library to support the language; Second, it's running so slow and using a lot of Memory! Java applet was adpoted by the Internet because it can run in all the operation systems. But I doubt its necessity because more than 90 % people were using Windows system at that time.
Anyway Java was treated as a pure OO language in academic, until the hardware is running faster to support it and people found it could be used in Server in the late 90s. Hardware is powerful to support Java as embeded system, and Java Servlet is widely used in websites now.
XML is facing the same problem. Yes, XML can denote data clearly, and it can maintain structured data without the support of database system. But it is wasting a lot of computing ability! Today using a java api I loaded a graph with about 9000 nodes from an XML file, tried to find some paths between the nodes. It took the program 2 hours to find 100 paths. If I design a text file structure, and develop a java program to do the same thing, it will not take more than 20 minutes to get the result.
Of course, it will take me 2 days to develop the program, and the program will not be reused anymore. XML and its api speed up the development, and make the program maintainable.
Maybe 2 years later faster hardware will help the spreading of XML, and maybe a killer application will put XML file everywhere.
Labels: Programming
3 Comments:
well, why don't you convert that 8000-node XML file to txt first?
Well, the project is for academic research, so running speed is not my first concern. I need to keep the same open standard file with others.
Also, as I mentioned, it will take a long time to develop the text file and program. The relationship between the 9000 nodes is very complicate, such as "subClassof", "part of", "has property of"... So it is hard to put that relationship in a text file.
When you working on an enterprise project, normally preformance is not a problem at all. Think about 40 clustered dual cpu servers running java. The speed is fast enough for business transactions. Of course, java or XML is not designed for scientific calculations, use Matlab for these project. Java is used when maintainable, transaction, security, modularity is more concerned.
<< Home