Welcome!

Geek, Nerd or whatever....
Home
Blog
About Me
Programming
DotNet
General
Sun SPARC
HarmonyVM Project
CV
Contact Me
Site Map

Wednesday, August 10, 2005

Proposal For harmony

Introduction to Harmony Project


Usman Bashir
Descon IT24 (Pvt.) Ltd.
Autonetzone.
Operation Badar
gripusa@hotmail.com
Abstract

Java is a dominant force in the information technology arena. Which is helping us to produce reliable, secure and multiplatform applications with an ease? Harmony is a collaborated effort to make the Java available to every one so that every can put his own flags in to its implementation. Harmony is also an effort to harmonize the work done by other open source initiatives. All these efforts are being done on the platform of Apache group which has a great respect in the open source world to produce exceptional products in the form of open source initiatives.

This document will try to put the efforts done and the goals that have been set by the team of harmony for this project. It will discuss the recent discussions in the community for harmony and its future plans, in both abstract and technical prospective.


Keywords.
Virtual Machine Software that acts as an interface between compiler Java binary code and the microprocessor (or "hardware platform") that actually performs the program's instructions.
LGPL LGPL allows everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
Architecture The software architecture of a program or computing system is the structure or structures of the system, which comprise software elements, the externally visible properties of those elements, and the relationships among them


Introduction to java.

Java has been around since more then a decade now; its popularity has been grown from browser's applets to Enterprise applications, from handheld devices to space ships. It has become a productive, secure and reliable platform to build applications. To date, the Java SE platform has been downloaded more than 50 million times, into embedded systems across the spectrum of consumer electronics, military, aerospace, telecommunications, automotive manufacture and industrial automation? A software market estimated to be worth $2.7 billion by 2007, up from $1.5 billion today, according to analyst firm Venture Development Corp

Java and open source community.

The community of java has been pushing up it further with new technologies and innovations. Java has been always empowered by the open source community that has adopted java as their premier platform since its beginning. Open source community has given a lot of goodies to the java and its technologies. There are several examples available for us where the community does help the java and help it to make more and more progress. The popular examples are tomcat, JBoss, hibernate, eclipse, struts and now many more are coming to help us to move free and open source world along with java. For example IBM, ORACLE and SUN are all pushing their premier IDE's free for us to use and developed. This is just because that we have created a background which makes them to push their core products as free. So when we are getting the boundary free why we are restricted from the core.

Basic Idea.
The basic idea behind harmony to create a modular VM and class library architecture, and using it, create a compatible implementation of J2SE 5.Harmony not only make us able to get a free and open source Java VM but also provide a modular architecture to plug and play with different class libraries and extensions living in the boundaries of specification imposed by the Sun Java Virtual Machine Specifications.
Sun Licensing.
This seemed to be a bit awkward goal for some one who is not familiar with the licensing terms.
As people usually consider the java free and open source completely but it is not the reality. You can modify the java source code compile it and build it but you are never allowed to share it with your sister company, neither you are allowed to participate in other open source activities by using your existing knowledge. It is because of the fact that Sun license impose a restriction over the user which has modified or reviewed the code of java virtual machine, he can not participate in any open source activity under the GPL or LGPL kind of licensing by either using or driving any thing from their source. This certainly prohibits the enthusiastic users of open source java community to look at the source code. This was a major implication for a user because he wants to review the code, share and distribute it with others by modifying it or using it as a baseline in some other applications.
Objective.
Harmony project will create a create a Compatible, independent implementation of J2SE 5 Virtual Machine that fulfils the requirements of Java Virtual Machine Specifications, community-developed modular runtime (VM and class library) architecture to allow independent implementations to share runtime components, and allow independent innovation in runtime components. In doing so, we intend to create a broad, collaborative community of contributors, implementers and users of the modular platform specification.
This virtual machine will be designed from ground up to create an optimized, modular, dynamic and extensible. It also let us to have the review over the implementation that is always hidden from us so it permit the users to modify the implementations to suite for their own purposes or even extend it with using the intension points that will be provided over the different nodes of the virtual machine.
Goals of Harmony.
While developing harmony following goals were set:
- have a simple plan upon which coding can immediately begin
- ensure that we have a focal point to begin the conversation among interested members of the community
- have a clearly defined set of technical needs to allow potential contributors, either code contributors or individual participants, a basis for consideration
- ensure that this is a community effort
- Together we will architect and implement via fresh new code or donation
- produce a set of specifications/designs allowing multiple interoperable implementations that allow for sharing, extension and innovation
Harmony and existing communities.
One of the questions does arise in once mind when there are other open sources initiatives are available in the community like Kaffe, SableVM, Jikes RVM, JNode and JamVM and so on, then why another activity is being put forward. Harmony is actually aimed to harmonize all these activities under one umbrella. This effort will not only help the existing communities to grow up more but also let them to communicate and integrate with each other on some solid base lines.
Harmony is not going to build everything from scratch, though there were few community members who proposed to do so, but most of members were agreed to use the existing efforts. For example it is decided to use ClassPath (that has been developed under GNU) as the class library for harmony project. So that initially the concentration should be focused to virtual machine. Similarly there are suggestions to use MMTK memory manager, GCJ compiler and integrate them into one combined solution for the user. It is also important to note that it is not necessary we are just using the integrating the work done by others and putting under the name of apache. It is rather a planned activity to put some thing in physical by using the existing code and then refined it one by one with the passage of time. As people only believe over the things that are in front of them physically rather then those which are still in air. This methodology becomes more important when you are developing open source projects and I remember at the very beginning many people came to mailing list and start asking when we are going to put some thing on actual.
So harmony is not putting another stone in the water rather then it is a combined effort to put the java community together and produce the things that are open and standardized with an harmonized effort.
Harmony and Sun.
Sun has been a long-time supporter of Apache and Apache projects, and Apache has a wide variety of projects that are implementations of Java specifications, such as Apache Geronimo, Apache Tomcat, Pluto, taglibs, etc. The Harmony is not an exception. This project is open to every interested member of the Java community, and every interested member is welcome to participate in whatever manner they choose.
Some people also thought that we are going to develop it because Sun has refused to release their source for Java SE under an open source license. But we would welcome if Sun doing that (as well as anyone else with a J2SE implementation!) as it would save a lot of time of us, and we whole heartedly encourage them to do so, but Sun has the right to do what it chooses with it's intellectual property rights.
So Harmony is not going to pull the weapons against the Sun rather then support the Java and its communities by creating a standard for integration though open source platform.
Components of Harmony:
The Harmony project will consist of following components that can be entitled as deliverables of the Harmony final release. But, as the project is still in early phase of development therefore it is not necessary that the list remains the same at the final stage.
Execution Modules
Execution Manager
Execution Engine
Code generator
Profile Collector
GC
Threading/sync Manager
Platform Portability Layer (OS and HW)
Class Libraries
Platform Accessors
VM Accessors
VM Core (the hub that glues all the above modules together)

Architecture of Harmony.
Although Harmony is not much at this stage that I talk about its architecture, as we are still looking for the different things to let the game begin. However after following the discussion of the community and participation some basic outline has been decided that will be followed during the development of harmony. I will try to explain the out line that has been almost decided so that you can have an over view how things are going to work in the harmony project.
The main internal structure of the JVM and class library project is illustrated above. According to discussions on the development list:
The Classpath project aims at creating a clean room, open source implementation of the Java standard API.GNU Classpath . (http://www.gnu.org/software/classpath) may be used to fill the need of the Classpath project, given that licensing may be honored on both sides, and proper credits are given.
The JVM project aims at creating a clean room, open source implementation of the Java Virtual Machine. There have been discussions of implementing it in Java, C/C++, or using a framework in which each component can be written in different languages. We currently lack a good choice for JVM code baseline. Potentially, we are facing re-implementing of JVM from scratch.
The OS Abstraction Layer (OAL) project aims at defining and enforcing a thin wrapper layer which connects the JVM and the Classpath to the services of the native OS. This layer is the only part directly interacting with the OS for non-development versions of the JVM. Currently the Apache Portable Runtime (APR) (http://apr.apache.org) seems the best choice.
The Development facilities project aims at creating APIs and tools to facilitate debugging and development-time profiling in order to track state within the JVM. Development facilities should be stripped from the build for non-development releases. Development facilities must be adapted to the JVM, and will therefore be defined pending the choice of JVM.
Expected Platforms.
The Harmony JVM is different from the existing JVM’s that its architecture will be designed in such a way that it will not tie to any particular platform or architecture. It will allow us to deploy our JVM on any kind of platform from embedded to enterprise environments. This is because that harmony is designed to keep this in mind that it can be extended to implement over any platform. However at first, we are focusing over the four major platforms i.e. Linux, Windows, Sun Solaris and Mac X. A VM for embedded system is also in view.
Current Status of Harmony.
The harmony is making a progress at a great pace; it already has caught the eyes of all major magazines, blogs and concerned companies like Sun, IBM, and BEA etc. Many people have already submitted their materials for the development and research like JVM’s, class libraries, memory managers and many more. The community is reviewing every submitted material so that it can be included directly or after extending it, in the project. There has been a heavy discussion on the licensing issues so that harmony may not run into the danger due to legal issues. The implementation language is also a major concern of the people , as some are arguing in the favor of java and others are determined to go with same traditional language i.e. C/C++. Similar an important thread over the mailing list is about the proposed architecture of the harmony.
In the recent days IBM has announced that it will support the harmony project and the employees working on the IBM J9 can participate in it. We have seen some good posts from them on mailing list as well. Similarly we got good suggestion from Bea’s experienced guys.
Harmony is currently in the incubation stage. Incubation stage in Apache projects referred to that stage, in which, the management of Apache has a close look over the projects under inception. If they think that the project has solid base line and well supported community then the project is moved from incubation to main projects as Tomcat, Meaven and others.
How to contribute.
To contribute into the harmony project , first you need to subscribe yourself with the harmony mailing list and then you can put your efforts on any topic that would you think, will help the project harmony. There are several different topics are available in which you can contribute with your skills like JVM sub projects, class library projects and development facilities project. To participate in the development you have to agree the simple licensed that has been put forward over the mailing list now so that we may not run into any kind of legal issues during the development.
Acknowledgement.

I would like to acknowledge Geir and every one in community who allow me to put my words on the community and then here in this document.

References.

[1] Wiki for Harmony
http://wiki.apache.com
[2] Apache home http://www.apache.com
[3] ClassPath site http://www.gnu.org/software/classpath
[4] Kaffe JVM http://www.kaffe.org
[5] Sun Java VM specification http://java.sun.com/docs/books/vmspec