Saturday, March 17, 2012

GSoC-2012 (The Second Life)


Today we had a Google Summer of Code (GSoC) meetup at the Department of Computer Science and Engineering, University of Moratuwa, 9 am - 3 pm, with multiple presentations and demos. This was the second time I presented the GSoC for the CSE, UoM undergraduates. However, last year the session was held at the IESL auditorium. Hence this year's session was important to all the resource persons, as doing the session at our own department for the very first time. The juniors showed a great enthusiasm, and I am confident that today's session was the best of all the sessions we had so far. 150 heads was recorded as the highest in our GSoC sessions history in today's session.

My GSoC presentation, which went for 80 mins, was themed "The Second Life." We were informed the list of the selected organizations at 12.30 a.m (IST) today, and we had the session at 09.00 a.m. This gave an additional motivation to the students. Not forgetting to update, AbiWord has been selected as a mentoring organization this year as well. I hope to mentor for AbiWord once more.

Friday, March 16, 2012

Google Summer of Code (The best of both the worlds)

Month of March is so special to me. I was introduced to two great open source projects in March, 2009 (AbiWord) and 2010 (OGSA-DAI).. ♥

Not everyone gets a chance to live........ a second life!
Now, the beauty of open source projects come into play that it gives you a chance to work on something that you are really interested in, in your own way. But not many of us get time to dedicate to an open source project due to our other commitments and as we are busy with our regular work, study, and related activities. The Google Summer of Code (GSoC) gives the best of both the worlds.

Why GSoC?
GSoC is an annual program from Google for the university students of age 18 and more. You will be coding for your preferred open source organization for 3 months. Google coordinates and awards the successful participants. Though open source organizations are run mostly by volunteer developers, Google pays the students with 5000 USD along with a certificate, an awesome t-shirt, and gifts! Hence you can focus entirely on the program during the 3 months time.

3 milestones. 
  • Getting Accepted (500 USD)
  • Mid-Evaluations (2250 USD)
  • Final Evaluations (2250 USD)

Some statistics of 2011
  • 175 Organizations
  • 2096 mentors and co-mentors.
Submitted
  • 3,731 students, from 97 countries.
  • 5,651 proposals.
Accepted
  • 1115 students/projects
  • 68 countries.
  • 595 universities.

The success rate is pretty high!
Last year, more than 90% of the students passed the mid evaluations, where around 88% passed the final evaluations. The high success rate is because, the mentors and the organization are with the student to provide him assistance and guidance, whenever is needed. 

The passion towards open source and the desire to be an outstanding student are considered to be the major reasons for a student to participate in the Google Summer of Code. Not to mention, while earning the money for the summer.

A computer with the Internet connection, knowledge and experience in the domain, and the motivation are the required to participate. Of course, you should really be interested in contributing to the particular open source organization.

Don't forget to check the


Before you begin..
  • Google Summer of Code is all about being Open Source.
    • Get your basics and motives right.
  • Netiquettes.
  • Sign up to the lists.
  • Join the relevant channel(s).

Technologies
  • Version Control Systems
    • SVN, CVS, GIT, Mercurial, ..
  • Build Tools
    • Ant, Maven, ..
  • IDEs (Integrated Development Environments)
    • IntelliJ IDEA, Eclipse, ..
    • Microsoft Visual Studio, Anjuta, ..
  • Issue Tracker
    • Bugzilla, Jira, Trac, ..

Communicating with the team..
.. and the mentor, over the Internet..
  • Mailing Lists
    • Dev, User, Commit lists, sub-groups, ..
  • Internet Relay Chat (IRC)
  • Issue Tracker
  • Forums and wiki
  • Blogs
  • Skype, Personal Mails, gtalk, conference calls, .. [with the mentors, if that is preferred.]

Network Etiquettes
  • Be Specific and clear.
  • Research (google.. ;)) before asking.
  • Be helpful to others.
  • Be ethical; respect.
  • NO CAPS! (UNLESS YOU ARE SHOUTING!)
  • Don't take messages personally.
  • Dn't snd ur sms msgs to thrds or lsts.

Proper Addressing..over the lists/irc/..
  • Address the devs and users properly.
    • First Name or Preferred calling name.
    • NO Sir, Madam, bro, sis, pal..
      • Even if you know them, personally.
    • No Mr., Dr., or Prof. either.
  • Be gender neutral.
    • “Folks” over “Guys and Girls”.
  • Not too personal.
    • Use “Hi”, instead of “Dear”.

Mailing lists
  • Post only to the relevant list.
  • Check the mail archives first.
    • To avoid getting RTFW/RTFM responses.
  • Avoid HTML mails.
    • Most of the mail servers do not like it. For eg, all the html mails posted to abiword mailing lists are dropped by the mail server. Make sure to turn off the html or rich text mail feature in your email program. It is by default HTML/RTF mail in the web mail like Gmail/Yahoo. Make them send plain text email.
  • No [URGENT]/[IMPORTANT] tags.
  • No unnecessary attachments.
  • No Cross Posting.
    • Stick to the proper mailing list only.
  • Don't hijack threads.
  • Don't post off-topic.

IRC Etiquettes
  • Be an observer first.
  • Refer to others using their irc nick.
    • Whenever my irc nick is mentioned, I get a pop up message from my irc client such as pidgin.
  • Don't expect immediate replies; wait.
  • Don't post bulk of text into irc.
  • Avoid these common mistakes.

Find a mentoring organization..
  • Have a look at the list of GSoC2011.
    • Since the list of this year hasn't been selected yet.
  • 175 Last year!
  • New Organizations.
  • Google as the mentoring organization.
  • Introduce GSoC to an organization (Sounds Smart!).

Find THE right project..    
Once you have found the right organization(s), that matches your interest and expertise, you have to go through the ideas list (e.g: the project ideas of AbiWord).

You can even contribute to the organizations, that aren't selected this year, as most of them still welcome the student contributors. OGSA-DAI had some great project ideas, but wasn't accepted this year as a mentoring organization.
    These were the organizations that I had my summer with. The beauty of these organizations is, they are friendly and provide a great learning environment. I was able to become a committer, developer, and mentor for these organizations. I learned open source with these organizations, and they have influenced me a lot positively. Apart from the coding, we always share thoughts and literally the AbiWord and OGSA-DAI communities have given me a colorful second life, which I would love to maintain as a developer, whenever I get a free time from the "first life".

    Get to know more about the projects
    • Talk to the mentor(s) Assigned by the organization for each project idea.
    • Mailing lists and archives.
    • Issue Tracker
      • Open issues or tickets
        • New features/enhancements (RFE)
        • Bugs (easy/difficult and normal/critical)

    What makes you special?
    • Experience
      • Being a great user doesn't mean that you can be a good developer.
    • Your interests and motivation
      • Pick something you really enjoy doing.
      • Being a great developer doesn't mean that you can be a good contributor.
    • Opportunities
      • What makes you the right person?
    • Willingness to contribute to the community beyond the time frame of GSoC.
      • We want committers and long time volunteers - Not just students!


    Experience
    • Languages
      • Java, C++, C, ..
      • Not much time to learn a new language (?)
    • Prove It!
      • Patches.
      • Assist other students!!!
      • Project expertise
        • Bug reports and fixes.
        • Go through the archives, wikis, and web sites.

    Opportunities..
    • Project that matches your previous work experience.
      • Choose the right project.
    • Timezone Difference 
      • Use it effectively - Most of us prefer to work in nights too, as we have the lectures in the mornings.
    • Multiple Applications (20!)
    • Preferences! 
    • Communicate early and often.
    • Be heard, visible, responsive,  and quick!
      • Ask questions, and more importantly answer others' questions.


    Apply

    Register as a student for GSoC, as the first step. Use the project's wiki for draft proposal, if applicable. Some organizations prefer that, where some discourage it. 

    Apply on Google's melange, at the earliest possible, as you can edit it later, till the last minute. Make sure to get the mentors' opinions and improve. Check melange often for the mentors' comments and attend to them. Make sure that you subscribe to the comments on your proposal in the melange site, such that you will receive email alerts for each comment that is made by a mentor/developer on your proposal. Your proposal can only be seen by the orgnization mentors, unless you decide to make it public.

    How to impress the mentors/developers?
    • Stick to the organization's template.
    • Abstract.
    • Introduce yourself properly.
      • Focus on the relevant facts.
      • Why do you fit? Your skill sets.
      • List of the patches (if any) you have submitted.
    • Project Goals
      • Proves you got them correct.
    • Deliverables
      • Code, Documentation, test cases, ..
    • Description - can also be given along with the timeline
      • Benefits to the organization and other projects  
    • Timeline
      • Finer details - Break upto periods of 3 - 4 days.
      • Testing takes time - Don't be over-optimistic.
      • Some organizations require considerable work hrs/week (40 ?).
    • Links - References and additional details.

    After the submission..
    • Don't go invisible!
      • Evaluation is still going on.. ;)
    • You may be asked to provide additional information.
      • Patches.
      • Screenshots.
    • Start coding on your project - only if you didn't apply for multiple projects.
    • Be motivated.

    Got Selected? Community Bonding Period!!!

    Don't Panic. You have one more month, just to mingle with the developers and the code base. Mentors are there to help you! Keep touch with the developers and users. Learn the project by going through the code base and documentation such as coding styles and coding guide lines. e.g: OGSA-DAI coding guidelines. This will help you understand the project idea more. Come up with a design and start with simple hacks.

    Coding

    Finally comes the coding - the easiest task of all. Commit often, if you are given committership. In AbiWord GSoC projects are usually given a branch in the public svn, which will be merged to the trunk, upon the successful completion of the project. In OGSA-DAI, based on the project, it is either committed to the trunk directly or given a branch. These two projects give committership to the students. However, some organizations/projects do not give committer access to the students. In such cases send daily patches otherwise.

    When committing or sending the patches, make sure to include meaningful Commit messages. Get feedback from the mentor(s) on your commits or patches frequently. Keep the community updated. Committing or sending patches daily would be a good approach.

    Plan for the mid and final evaluations early, with the mentor. This will help you reach the target successfully. You might also need to revisit the project goals if required, during the milestones.



    Conclude/Continue

    Pencils Down Date - to stop the coding. Still you can refactor and improve the code, fix any last minute bugs, and work on finalizing the documentation. This is follwed by the firm pencils down date, which literally finishes the Google Summer of Code. 

    Whatever coding or related job done on your project after the firm pencils down date will not be considered part of your summer of code, and will be considered a volunteer work on the project. Get a tarball of all the diff files to submit to Google. Successful submission of the tarball along with the successful final evaluation ensure your success in the Google Summer of Code.

    Focus on becoming a committer if not already given committership. Keep contributing to your project.



    A few links
    This blog post has gone a bit longer, since I tried to include all the information in a single post. Wish you all the best.

      Monday, March 12, 2012

      Building Apache HTTPD Load Balancer from trunk on Ubuntu 11.10

      This post discusses how to install Apache Module mod_proxy_balancer locally.
      However, you can just configure mod_proxy load balancer using the builds, without using the source.
      Downloading the sources
      Download the HTTPD source and extract it
      http://httpd.apache.org/download.cgi#apache24

      Download APR, APR-Util, and pcre
      http://apr.apache.org/download.cgi
      ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.30.zip


      Unpacking
      Unpack APR and APR-Util into ./srclib/apr and ./srclib/apr-util
      Be sure the domain names do not have version numbers; for example, the APR distribution must be under ./srclib/apr/
      Extract pcre as well.

      Building pcre
      Go to pcre root directory
      sudo ./configure --enable-unicode-properties
      make
      sudo make install

      Configure HTTPD Load Balancer
      Go to the httpd root folder.

      ./configure --with-included-apr --enable-proxy --enable-proxy-balancer
      make
      sudo make install

      Now you have installed the Apache HTTPD Load Balancer locally, to its default location $APACHE2_HOME - /usr/local/apache2/. You can configure it to balance the load across your service instances that to be load balanced.

      Sunday, March 11, 2012

      Configuring Apache mod_proxy load balancer

      Installing Apache2 Server
      -------------------
      sudo apt-get install apache2
      sudo /etc/init.d/apache2 restart
      
      Setting up HTTPS
      -----------------
      sudo a2enmod ssl
      sudo a2ensite default-ssl
      
      Setting up load balancing modules
      ----------------------------------
      sudo a2enmod proxy_balancer
      sudo a2enmod proxy_http
      
      Now enable mod_proxy in Apache, and proxy requests to the application server by adding the example below to your Apache httpd.conf
      # Put this after the other LoadModule directives
      LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
      LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so
      
      cd /etc/apache2/mods-available
      sudo vim proxy.conf 
      
      
              # set ProxyRequests off since we're only using the ProxyPass and ProxyPassReverse
              # directives. this keeps the server secure from
              # spammers trying to use your proxy to send email.
      
              ProxyRequests Off
      
              
                      AddDefaultCharset off
                      Order deny,allow
                      Allow from all
                      #Allow from .example.com
              
      
              # Enable/disable the handling of HTTP/1.1 "Via:" headers.
              # ("Full" adds the server version; "Block" removes all outgoing Via: headers)
              # Set to one of: Off | On | Full | Block
      
              ProxyVia On
      
      # Put this in the main section of your configuration (or desired virtual host, if using Apache virtual hosts)
      ProxyRequests Off
      ProxyPreserveHost On
      
      
          Order deny,allow
          Allow from all
      
      
      sudo apt-get install libapache2-mod-proxy-html 
      
      cd /usr/local/apache2/conf
      
      Add the below line to httpd.conf
      Include conf/extra/httpd-proxy-balancer.conf
      


      Restart and reload the server
      ------------------------------------------------
      sudo service apache2 restart
      sudo service apache2 reload
      

      Sunday, February 26, 2012

      Apache BarCamp Colombo

      We are having a two day Apache BarCamp in Colombo today and tomorrow. The first day sessions went really interesting today at the Prof. VK Samaranayke auditorium, University of Colombo School of Computing. I moderated the "Google Summer of Code - The Apache Way" - an excellent panel of 3 past Google Summer of Code students who have participated in the Google Summer of Code program twice (2009, 2010, and 2011). They shared their experience with their projects - Apache (Photoark, Tuscany, and Derby) and OpenMRS. The panel discussion followed my short introduction to the Google Summer of Code. Please find the complete version of this short presentation at the Introductory Presentation to the Google Summer of Code 2012.