Showing posts with label google. Show all posts
Showing posts with label google. Show all posts

Saturday, April 25, 2009

Summer of Code is Back

Google Summer of Code 2009, the annual open source feast organized by the Internet giant Google is now underway. I also applied for the contest and I'm pleased to announce that my project proposal to implement SQL authorization support for Apache Derby dblook has been accepted. So that makes me a GSoC winner, two times in a row. Last year I implemented XML Schema 1.1 type alternatives support for Apache Xerces2/J under the guidance of Khaled Noaman. This year Dag Wanvik will be mentoring my project. 

I'm eagerly looking forward to complete this task in time and of course in classy fashion. Apache Derby community is really active, dynamic and supportive. I feel gifted to get an opportunity to work with such a passionate group of committers. And not to mention this is going to be a great learning experience as well as a genuine test of skill for me.

On the sad side, this will probably be the last GSoC I'm going to take part as a student of the University of Moratuwa. I will be officially passing out from the University in a couple of months time. University of Moratuwa became the no. 1 ranked institute in last year's GSoC which made us really happy and proud of ourselves. I'm confident that my University has ranked pretty high this year too (Google haven't released the numbers as of yet). So that means this is the last time I get to enjoy being on top of the world in GSoC :(

Friday, October 10, 2008

Google Chrome, Looking Good

It seems almost everybody is taking a strong liking into Google Chrome these days and almost everybody who has downloaded it seems to be appreciating it a lot. So I myself thought of giving Google Chrome a trial run. 

However I have to say that my first impression on Google Chrome was not a very good one mainly due to the fact that it’s only available for the Windows platform at the moment. I’m an open source fan and that makes me naturally dislike anything that won’t run on Linux out of the box. However I think I can forgive Google for that. I believe they just wanted to keep the things simple by focusing on one target platform since this is only a beta release. Also they probably wanted to get the maximum possible test coverage out of this release. In that case Windows is the only logical solution since whether we like it or not Windows still dominates the client side system software market. (and it will probably remain that way for a long time :-( )

Other than the above mentioned glitch my experience with Google Chrome has been a fairly good one. It’s easy to install and configure. I really like the wording and labeling convention used in Chrome. It’s simple and casual English that anybody can understand. Not a single technical word is used so that even someone who is browsing the Internet for the first time can easily get used to Google Chrome. Even the buttons that are usually rendered as ‘browse’ buttons in other browsers will be rendered as ‘choose file’ buttons. 

The user interfaces are pretty cool too. Chrome UI designers have clearly dumped the approaches taken by IE developers and Firefox developers to come up with their own style. It has no menu bars and no tool bars. All it has is the address bar with few more additional controls embedded into it. The address bar can be used to type in both URLs and search queries. One advantage of this organization is that it makes the browser’s main Window large so that the user can see more content without having to scroll much. But the problem is for someone who is so used to IE or Firefox, figuring out how to control the browser is going to be a bit of a pain.

In my opinion it has slightly better performance compared to Firefox-3 and IE-7. (well at least I feel that way) I have experienced frequent browser crashes with both IE-7 and Firefox-3. But I’m yet to experience that in Chrome. 

Perhaps the most enticing feature of Chrome is that every time a new tab is opened a new process is forked off by the browser. This way each tab gets its own set of resources. This will hopefully rectify most of the memory related issues experienced by other browsers. If you are a regular Firefox user you know that as we continue to open new tabs in Firefox the overall performance of the browser degrades significantly. This is because all the tabs have to share the same set of resource (memory in particular). By dedicating a separate process for each tab Google Chrome effectively deals with this issue.

I will continue to test Google Chrome in the days to come. I just started with Chrome and I will be in a better position to give a comprehensive feedback after another couple of weeks. Until then ‘good job Google’!

Monday, September 1, 2008

GSoC 2008 ....... Done

You may have noticed that my blog has gone rather silent in the last couple of months. Well, the reason was my Google Summer of Code (GSoC) project. The final deadline was on 18th of August so I worked really hard to deliver the goods on time and finally I can proudly state that I managed to successfully complete my project on time.

The objective of my GSoC project was to implement XML schema type alternatives support for Apache Xerces2/J, the legendary open source XML parser for Java applications. Type alternatives is the answer from W3C XML schema working group, for conditional type assignment problem. This feature was first introduced in the XML schema 1.1 structures specification. Type alternatives allow a type to be assigned to an element dynamically at validation time based on one or more conditions. Conditions are expressed as XPath 2.0 expressions. Here is an example element declaration which uses XML schema type alternatives.

As stated in the above code snippet the declared type of the message element is the complex type called messageType. However the element declaration also contains a few type alternatives. These type alternatives allow the type of the message elements to be determined at the validation time. Based on the conditions stated as the test attribute values the schema validator will assign a type for the message element prior to validating its content. The expressions '@kind' and '@code' refer to two attributes of the message element. The first type alternative will assign the type called messageTypeString if the kind attribute has the value 'string' and the code attribute has a value greater than 1000.

When the schema validator encounters an element declaration with one or more type alternatives it will evaluate the test expressions one by one until an expression which evaluates to true is found. When such a matching type alternative is found the corresponding type will be assigned to the element. If none of the type alternatives match then a default type will be assigned.

My project mainly consisted of two main sections. First section of the project was to implement the type alternatives traversal support so that Xerces2/J can properly traverse an XML schema document which contains type alternatives and add the corresponding information to the schema grammar. Implementing this was fairly easy and I managed to complete it prior to th GSoC mid term evaluations. The second part of the project was to implement type alternatives validation. This was fairly difficult since I had to develop a bare minimal XPath 2.0 implementation for Xerces2/J. Developing the XPath processor actually covered a significant portion of the entire project.

My workings will be fully available in the Xerces2/J code base (even now the code related to traversal part is in one of the SVN branches) very soon. All in all it was a great learning experience as it was a great opportunity for me to learn a whole bunch of cool technologies like XML, XML schema, and XPath 2.0. I also got the opportunity to put some of my knowledge on theory of computing into action and sharpen my programming skills. I would like to give my heartiest gratitude to the Google, the Apache community and very specially to my mentor Khaled Noaman for being a very supportive guide right from the start of my project.

Sunday, May 18, 2008

University of Moratuwa Climbs to the Top with GSoC 2008

For years University of Moratuwa in Sri Lanka has been doing a kick-ass job in the process of converting talented youngsters in Sri Lanka into world class computer engineers and IT professionals. It is not a secret that out of all the IT education centers in the country University of Moratuwa is the best in the business. Graduates passed out from the University of Moratuwa can be found virtually in any software firm in Sri Lanka and every year a significant number of University of Moratuwa graduates end up joining some of the finest organizations and universities in the world.

Talking about kicking butt, this time around University of Moratuwa has managed to kick some really serious butt big time. Being able to secure the first place in the Google Summer of Code 2008 (GSoC 2008) top participants list is no ordinary thing. According to the latest statistics from Google it is from the University of Moratuwa, Sri Lanka that the largest number of GSoC 2008 applications has been received. The blistering number of applications is 93! The second place of this list goes to University of Campinas, Brazil. 29 applications have been received from University of Campinas. So clearly University of Moratuwa is way ahead from the rest of the world with this regard.

Also Google has declared that University of Moratuwa has forwarded the largest number of winning GSoC 2008 applications. There are 23 winning applications from University of Moratuwa this year from which 18 are from the department of Computer Science and Engineering. I personally feel very proud of this achievement and feel really happy about myself for being able to be one of those 18 winners.

Sri Lanka is among the top 10 GSoC 2008 participant countries this year. Sri Lanka is holding this position along with countries like USA, Canada and India who are at the frontier of the global IT industry. However out of all the IT education institutes in Sri Lanka only University of Moratuwa has earned a position in the top 10 GSoC 2008 participant institutes list. This is an clear indication of the level of excellence University of Moratuwa has reached over the past couple of decades in terms of quality of education. In addition to that this achievement by the University of Moratuwa is an indication of the fact that a new generation of computer engineers and IT professionals who appreciate and support open source software is being created at Sri Lanka.

Sunday, May 11, 2008

Open Source is Cool!

Recently among the GsoC 2008 participants, there was a very interesting discussion about what makes open source software cool. The discussion lasted for several days and it really brought up some interesting ideas and comments about the open source software movement. It was really fascinating to see youngsters from all over the world describing their opinions about open source software in their own words and own style of writing. Some of the postings did even touch areas like economics, philosophy and politics.

According to some of the GSoCers, open source software is cool mainly due to the community interaction associated with them. With open source software one can make a few contributions to a project and in return get thousands of contributions from the community. All these contributions help to improve the quality of the software and help the community achieve their goals. Also this opens up some opportunities for individuals to make some new friends with common interests.

Some GSoCers believe that it's the transparency aspect of open source software which makes them cooler than proprietary software. With open source software it is really possible to see how something works down to the least bit of byte code. And if it doesn't work then the individual contributors can fix it themselves. In addition to that open source software enable individual users and developers to change the software at will to suit the requirements which is not an option with proprietary software. With proprietary software most of the time you have to change the requirements to suit the capabilities of the software. According to some GSoCers software resembles knowledge. Open source software thus becomes a powerful medium for sharing knowledge in a free, transparent and collaborative environment. They believe that by making software and thus knowledge freely available and accessible the entire human race can benefit from everyone's work.

According to the opinion of some GSoCers open source software brings results faster. With source code of software open to everybody bugs can be detected faster and corrected quickly. Also due to this nature open source software projects mature faster in terms of quality and performance.

Apart from the two or three ideas described above there were also some exciting comments on software freedom, humanitarian aspects of open source software and economical aspects of open source software. All in all I believe that this discussion makes some fine reference material for everybody who is interested in computer science and software engineering. It's really heartening to see that a whole new generation of software developers that trusts, respects and appreciates open source software is being born.

Tuesday, April 29, 2008

GSoC 2008 is On

The all important initial phase of the Google Summer of Code 2008 (GSoC) came to an end last week. The selected project proposals were published on the GsoC website on 21st April. I too applied for this year's contest and my project proposal to implement type alternatives for Apache Xerces2-J was among the qualified proposals. The Apache Software Foundation has received around 30 slots this year and one of them is allocated to my proposal (yipeee!!!). I consider this as an great opportunity to learn and master XML and XML schema while contributing to a world renowned open source project.

Apache Xerces2-J is a high performance, standard compliant XML parser. It currently supports a number of XML related standards like XML 1.0, XML 1.1, DOM, SAX, JAXP and XML schema 1.0. A variety of open source and proprietary software projects make use of Apache Xerces2-J as the core XML parsing and processing mechanism. The reason for this immense popularity of Apache Xerces2-J is probably the high number of standards it supports and the way it supports them. Nowadays Apache Xerces2-J is even distributed along with popular Sun's JDK.

Xerces development team is currently involved in getting Xerces2-J to support the XML schema 1.1 standard which is the latest XML schema specification. XML schema 1.1 specification like its predecessor is comprised of three main parts namely the primer, structures and data types. Type alternatives is a feature that falls under the XML schema 1.1: structures spec. This is one of the most significant additions to the XML schema standard and it provides a well organized mechanism to implement conditional type assignment which has been in the XML schema feature wish lists for years.

With type alternatives XML elements can be assigned types based on one or more conditions (thus the name conditional type assignment). The conditions are specified as Xpath 2.0 expressions and the relationship between a condition and the corresponding type can be expressed using the 'alternative' element as in the following example.

The Xpath expression which specifies the condition is expressed as the value of the 'test' attribute and the corresponding type is expressed as the value of the 'type' attribute. Alternatively one could use 'simpleType' or 'complexType' child elements to specify the type instead of using the 'type' attribute. A complete example illustrating XML schema type alternatives would be as follows.
Here we have defined an element named 'value' which is of declared type 'valueType'. But based on the actual value of the 'kind' attribute the 'value' elements can have a different governing type. When XML schema validations are performed the elements will be validated against their governing types.

Type alternatives can add lot more flexibility to the way XML schema documents are used and it gives more freedom and power to the XML schema author. With type alternatives the XML elements having the same name can be of different governing types. In the above example different 'value' elements can take one of three types (integer, short or byte). Also the same element can have a governing type that is different of the declared type. This wouldn't have been possible if not for the type alternatives.

All in all type alternatives is a very interesting and useful feature for XML schema authors. That makes it very important for Xerces2-J to support it. I have worked with XML and XML parsers like DOM and SAX a lot in the past. I have used Apache Xerces2-J in a number of occasions too. But to be honest I haven't really worked with XML schema much. So this really is a big learning opportunity to me. I have been studying the XML schema specs for the last few weeks and I have already collected a whole bunch of stuff on XML schema to my knowledge base.

My heart is itching to start with the coding part but I know that there are lot of things to be studied, analyzed and clarified before I get to that point. Wish me luck!!