Sunday Jul 11, 2010

Test support for indian languages for JavaME apps


JavaME supports Unicode string objects and hence you can display text in Indian languages within your applications. Everything looks very nice when you run such application inside an emulator running on your desktop. However, things may (rather most likely) not look great when you install the application on the mobile device.

This is primarily because JavaME depends on the native support for displaying such text. This means if your device does not support Unicode font and specific encodings, you will not be able to display text in indian languages properly.

Mobile device manufacturers, in most cases, do not guarentee Unicode support. This provides a big challenge for the developer community to qualify their applications on various devices and  in the huge indian market with hundreds of low-cost/high-end devices from various manufacturers such qualification is impossible. So, that brings us to the big question of this post,
For a specific device, Is the text in Indian languages displayed correctly ??

To answer this, I thought it would be nice to have a simple application that displays text in various indian languages that can be used to confirm if their device can display the text correctly. The idea is to use this application to test the native unicode support on your mobile device.

Clearly, this app is more useful when you do not have WiFi on your device which is a big number in Indian market and really my target audience for this post. If you have WiFi on your device, you can visit this site and confirm if the device can display text properly.

This application displays the "Pledge of India" in various Indian languages. The pledge is an obvious choice for such application given the Indian context. I am sure there are some folks out there who don't quite remember the pledge now and would find this application useful in that sense as well.

This application is tested on Nokia 5800 device. I had to add the Unicode font manually to the device to get it to work and still see glyphs overlapping each other for UTF-8 encoding. I'd appreciate your test results as comments here.

Topics like installing this application or the Unicode fonts on your phone are not covered in this post as I believe there is information available on the internet and rather it is more complicated :)

Finally, Here is the unsigned jad and jar file. It supports only Hindi & Marathi as of now. feel free to post your suggestions. If you are viewing this blog from your JavaME supported phone, clicking the link of the jar file should let you install this application.


Wednesday May 05, 2010

Virtualizing your applications, Oracle Tech Days, Hyderabad 2010


Here is my session on support for various Virtualization technologies on Oracle Solaris platform.


Abstract: The session will discuss the core features of the OpenSolaris OS that make it a solid foundation for use as the host operating system in a virtualized configuration. The session will provide an introduction to basic virtualization concepts and an overview of the built-in alternatives the OpenSolaris OS provides, including containers, VirtualBox software, the OpenSolaris xVM hypervisor, and LDoms. The session will compare the capabilities of the various alternatives, showing their trade-offs and providing a basis for deciding when to choose one or the other.


The session was part of the Oracle Tech Days, Hyderabad, Mar 2010.

Thursday Jan 28, 2010

Change is the only constant thing...

Like many other aspiring engineers Sun was my dream job when I was in college. I got into Sun through campus interviews and have lived this dream for almost 8.5 years now. Not many people get their dreams fulfilled so early in their career and I must say I am very lucky to have found the right place right at the beginning.


Change is the only constant thing in life and I will always cherish my experience at Sun for the longest time.

Looking forward to be a part of Oracle.

you can follow me on my personal blog, http://mayureshnirhali.blogspot.com

Monday Mar 02, 2009

Sun Tech days, Hyderabad 2009

Sun Tech Days Hyderabad, the biggest Sun developer conference in India took place in the Hyderabad International Convention Centre from 18th to 20th February. The event saw over 4500 people during these 3 days, which is the largest audience for any Sun tech days event globally. This year, the percentage of students attending the conference were a bit higher than what we have seen in the past. But, that also meant there was more energy, zest at the event and of course the fight for goodies at the pavilion was much bigger.


The event had sessions running in 6 parallel tracks and like in the past, there was a separate track for OpenSolaris. The highlights of the OpenSolaris track are,

1. Over 1700 people attended sessions in this track with an average attendence of 300 per session.
2. Extended Q&A sessions testified the quality of audience that included corporate delegates, system administrators and ofcourse students.
3. The local team in India presented all the sessions and program managed the track. The team in India was supported by Vijay Tatkar from the global OpenSolaris team and ofcourse Sanjay who also did the OpenSolaris keynote.
4. The Sun Campus ambassadors generated a lot of interest in the audience with their Sun Spot and OHAC project presentations,  another noticable highlight of the track.
5. At the installfest, sun team did a fantastic job of getting OpenSolaris up and running on over 90 laptops. This includes over 25 bare metal installations and the rest using VBox.
6. At the OpenSolaris stall in the pavilion, OpenSolaris, xVM, Crossbow, Amberroad, Dtrace and ZFS were demonstrated. The Sun CAs also had their other projects on display.

I presented 'Porting Open Source Software to OpenSolaris'. The session was attended by around 200 people. I was also managing the OpenSolaris track, which personally was a very enjoyable experience.

Saturday Feb 28, 2009

Information and Database Technology workshop at VJTI, Mumbai

VJTI, Mumbai organized a 5 day conference on Database research in January 2009. I presented MySQL there on the second day of the conference, 4th Jan 2009. The conference saw faculty members representing various universities/college from in and out of Maharashtra state along with some of the VJTI MTech students.

The main idea behind the conference was to initiate more research by the universities and also to connect the faculty members with the corporates.

MySQL and IBM's Tivoli were the only two products that were presented in the 5 day conference and the rest topics were all around research and development in database technologies such as distributed databases, GIS databases and such.

Working on the first sunday of the new year isnt a very good thing generally, but I think it was well worth it.

FSFS.IN/2008 Report


Free Software Free society conference in december 2008 was a very unique experience for me. The conference was attended by over 450 people. It was very encouraging to see the political involvement in this event.

Kerala government has shown tremendous awareness towards adopting free software. The fact that Kerala Chief Minister, V S Achuthanandan inauguarated the conference and the opposition party leader did the closing ceremony is enough of evidence that the conference had significant political weight. The conference also received a lot of media coverage (television as well as newspapers). This attention is not always seen in other parts of India.

The conference consisted of two tracks, one, Policy track where Free software in Education and research, Fisheries, Agriculture was discussed and the second, Technology stack, that covered all the technical Free and Open Source Software sessions.

I presented MySQL and OpenSolaris on second and third day of the conference and it was received very well. Both sessions, in spite being towards the end fetched a lot of audience, in the magnitude of 150 approx.

The policy tracks were very interesting, I thought. The speakers represented various fields like Eductation, Government, Corporates and Legal advisers and discussed on various topics to further adopt free software in government infrastructure and also elsewhere.

The audience was a quality audience. Many of the them represented various GNU projects. There seemed to be a lot of interest around people working on Malayalam localization.

I had a chance to interact with some of the students, whom I was showing OpenSolaris running on my laptop. He showed me the puppy Linux running on his and also mentioned that the Kerala state electricity board has systems running puppy Linux. I was delighted to find that they are not running Windows and very surprised to learn that a final year student knows a lot about what their government is doing with foss. I asked him if he would like to join their IT division and he reacted, 'that would be my pleasure'.

The event turned out to be very special as I had a chance to listen to and shake hands with Sir Richard Stallman. Sir Stallman's inaugural speech had made a good impact on me. He spoke very passionately about Free software and that clarified the real difference between free software and open source software for me. I really salute him for the passion he carries for the free software, but feel open source software is more real and practical.

During the conference I also heard about a very interesting project called gnowledge.org. This project is about building relationship and associate network for the knowledge articles. e.g. Water depends on knowledge of Hydrogen and Oxygen. The most interesting part here is that the dependent articles are based on Debian packaging system. So, when someone is fetching articles for H2O, one would automatically fetch dependent articles for Hydrogen and Oxygen. Smart!

The conference was extremely well organized. There was entertainment arranged for all the attendees after the sessions on all the days. I had a rare chance to see the Koodiyattam and will always cherish that experience. I strongly believe that Kerala is putting up a great example for other states in India for their foss adoption and I would love to participate in this conference again.

Thursday Dec 04, 2008

presenting at FSFS conference

Free Software, Free Society (FSFS) is hosting their 2nd International conference on Freedom in Computing, Development and Culture on 9-11th, December 2008 at Mascot Convention Center,
Thiruvananthapura, Kerala, India. I am doing couple of sessions at this conference, on MySQL and OpenSolaris. You can find other sessions from Sun on their schedule.

From their website, The Free Software Movement, started about a quarter of a century back, pioneered the various movements for freedom in the digital world – for instance, free knowledge represented by Wikipedia or freedom of creative works from copyright restrictions represented by Creative Commons. We also see a new form of social production where collaboration becomes more important than competition, where people from different parts of the world co-operate to create digital products including documents, music or software. These movements, in their own way, are helping to bring about a reduction in the Digital Divide and increasing access to useful works of knowledge. It is perhaps time to define the contours of this new space and situate interventions therein. Located at the intersection of Free Software, Development and Society, the FSFS Conference will examine the application of the Free Software model for freeing intellectual artefacts from the clutches of restrictive laws (like the Copyright Act), and making them available for human development. The conference will also address, inter alia, issues such as technology access and the digital divide, legal issues, and experiences of using the Free Software model in fields such as music, and literature.

Sir Richard Stallman
is doing the inaugural session and there are many more known FSF faces on the speaker list that excites me about this conference. If you happen to be attending this conference, I would be happy to talk to you!

Tuesday Dec 02, 2008

FOSS.IN/2008 Report

The FOSS.IN/2008 was a very different event than what it has been and I think that is how it was intended to be. This year, it was a contributor's event in its true sense. A bunch of folks representing community 'X', sitting together and hacking/discussing something is the only thing one could see at the event. Although, about 1000 people registered for the event, I did not see more than about 450 people at any given time.

personally, I did not enjoy FOSS as much as I have in the past. Somewhere the energy seemed lacking. The main reason I think was simply the fact that number of people around you were far less than ever. Plus, the people who attended FOSS seemed to have a set agenda w.r.t to their own communities. Of course, the idea of FOSS this year in itself was to meet with fellow community members and discuss things specific to their communities, but the whole idea of having far less people around you was not too encouraging.

hacking KDE at FOSS.IN/2008 I attended most of the sessions I planned to attend, but for the Belenix workout. It was on Saturday and I had something else to take care of. The one thing that I am taking back with me from the this conference is my improved understanding of adding SDT Dtrace probes to C/C++ applications. This happened thorough the Gnome/KDE dtrace workouts that I attended. My next goal is to play around with Dtrace and wxWidgets libraries (something that I am maintaining for OpenSolaris recently) and see what probes could help diagnose GUI applications based on wxWidgets.

The rest of the time, I spent at Sun booth, talking to people about OpenSolaris, dtrace, zfs and MySQL. At the booth, we were running a couple of contests/exercises. One, to get people to install VirtualBox and have OpenSolaris as a guest and secondly, we had dtrace one liners printed out for people which can be tried on their OpenSolaris guests. Given the number of people at the event, the turn out at the booth was not overwhelming. I could connect with hardly couple of hundreds of people, which is far less than the previous year. I loved the complete new look of Sun brochures this time and of course, the Sun/Fossin jackets!

Thursday Nov 20, 2008

Get set for FOSS.IN/2008


It seems as if it was not too long ago, when a bunch of us, OpenSolaris enthusiasts, were hacking on OpenSolaris and fixing some byte size bugs at the HackCenter @ FOSS.IN/2007. The great degree of enthusiam and energy at the event makes it the Best FOSS event in India in my opinion.

Its that time of the year again and the format of the event has changed, yet again. The big list of talks is out and workouts are in. This year, the event features only a handful of talks and more workouts/hackathons. The message, "Talk is cheap, Show me the code", is crystal clear with an open invitation to all the contributors and only the contributors. Well, so far, there are hardly 1000 people registered for the event, but it seems like they all have a clear plan as to what they will 'code' at the event, rather than a huge number of lurkers who just come to listen.

So, Whats my plan?? I am really excited to see a good number of workouts around OpenSolaris and a bit disappointed that there is no Open Source Database (MySQL, PostgreSQL and Derby) presence. I am planning to attend all the OpenSolaris related workouts. For those who are interested in OpenSolaris, please note the following events and lets Dtrace together.


\* Workouts-

- Profile Gnome using Dtrace, Thursday, 27th Nov, 10:00 am, C/60

- Adding Dtrace probes to KDE, Friday, 28th Nov, 02:00 pm, C/60

- Alternate OS probe module for Belenix Installer, 29th Nov, 02:00 pm, C/60


\* Talks-

- KDE on Solaris, Wednesday, 26th Nov, 03:30 pm, JNTata


The other talks that I plan to attend include,

- How to do embedded Linux right, Tuesday, 25th Nov, 10:00 am, JNTata

- Lustre: A scalable clustered FileSystem, Thursday, 27th Nov, 05:00 pm, JNTata


The detailed schedule is here. Like in the past, FOSS.IN this year, is focused on Open Source systems technologies, there is hardly any presence of open source web technologies like Glassfish, OpenSocial, OpenJDK etc. It will be good to see these technologies at FOSS.IN.

Anyhow, I am really looking forward to the workout sessions at FOSS.IN this year, see you there!

Wednesday Nov 19, 2008

Debug tracing in JavaDB

JavaDB (a.k.a Apache Derby) has a lot tracepoints that could be very useful when debugging complex issues. The best part with them is that these tracepoints are logically grouped together. When enabled, traces related a particular logical section of the code can be obtained. e.g. If you are looking for information around Locks in the JavaDB system, then you could simply enable the LockTrace. The list of such logical components is really huge in the JavaDB system.

The simplest way to define these debug properties is to use the derby.properties file in the derby.system.home directory. To enable debug tracing for Locks and Cache systems in JavaDB, you could add following in the derby.properties file,

derby.debug.true=LockTrace,CacheTrace

Similarly, you can define 'derby.debug.false=XX' for disabling the debug trace for a particular set of components.

The complete list of debug properties can be found here. Try it, but only if you can handle the huge output that it generates most of the times.

Thursday Nov 13, 2008

Debugging PAM in Solaris

Pluggable Authentication Module (PAM), as defined here, allows integration of various authentication technologies such as UNIX®, Kerberos, RSA, smart cards and DCE into system entry services such as login, passwd, rlogin, telnet, ftp, and su without changing any of these services.

To see all the debug messages generated during PAM authentication, one needs to follow 2 simple rules,

[1] Configure the syslog daemon (system-log service), to print the debug messages to a specified file/device. You could do this by editing /etc/syslog.conf as given below,

\*.debug        /var/log/pam_log

Restart the system-log service.

[2] touch /etc/pam_debug.

PAM implementation uses /etc/pam_debug file as a debug flag and if found, starts printing the debug messages to the file configured in syslog.conf file.

This is the debug output I see when I login to my desktop from the locked Xscreen,


Nov 13 17:16:20 dancefloor xscreensaver[726]: [ID 910332 auth.debug] PAM[726]: pam_start(xscreensaver,blood,8047860:80eec18) - debug = 1
Nov 13 17:16:20 dancefloor xscreensaver[726]: [ID 874416 auth.debug] PAM[726]: pam_set_item(80eec18:service)
Nov 13 17:16:20 dancefloor xscreensaver[726]: [ID 874416 auth.debug] PAM[726]: pam_set_item(80eec18:user)
Nov 13 17:16:20 dancefloor xscreensaver[726]: [ID 874416 auth.debug] PAM[726]: pam_set_item(80eec18:conv)
Nov 13 17:16:20 dancefloor xscreensaver[726]: [ID 536501 auth.debug] PAM[726]: while load_modules[0:/etc/pam.conf](80eec18, pam_sm_authenticate)=/usr/lib/security//pam_authtok_get.so.1
Nov 13 17:16:20 dancefloor xscreensaver[726]: [ID 186051 auth.debug] PAM[726]: load_function: successful load of pam_sm_authenticate
Nov 13 17:16:20 dancefloor xscreensaver[726]: [ID 536501 auth.debug] PAM[726]: while load_modules[0:/etc/pam.conf](80eec18, pam_sm_authenticate)=/usr/lib/security//pam_dhkeys.so.1
Nov 13 17:16:20 dancefloor xscreensaver[726]: [ID 186051 auth.debug] PAM[726]: load_function: successful load of pam_sm_authenticate
Nov 13 17:16:20 dancefloor xscreensaver[726]: [ID 536501 auth.debug] PAM[726]: while load_modules[0:/etc/pam.conf](80eec18, pam_sm_authenticate)=/usr/lib/security//pam_unix_cred.so.1
Nov 13 17:16:20 dancefloor xscreensaver[726]: [ID 186051 auth.debug] PAM[726]: load_function: successful load of pam_sm_authenticate
Nov 13 17:16:20 dancefloor xscreensaver[726]: [ID 536501 auth.debug] PAM[726]: while load_modules[0:/etc/pam.conf](80eec18, pam_sm_authenticate)=/usr/lib/security//pam_unix_auth.so.1
Nov 13 17:16:20 dancefloor xscreensaver[726]: [ID 186051 auth.debug] PAM[726]: load_function: successful load of pam_sm_authenticate
Nov 13 17:16:20 dancefloor xscreensaver[726]: [ID 947272 auth.debug] PAM[726]: pam_get_user(80eec18, fef86970, NULL)
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 874416 auth.debug] PAM[726]: pam_set_item(80eec18:authtok)
Nov 13 17:16:23 dancefloor last message repeated 1 time
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 536501 auth.debug] PAM[726]: while load_modules[0:/etc/pam.conf](80eec18, pam_sm_authenticate)=/usr/lib/security//pam_dhkeys.so.1
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 536501 auth.debug] PAM[726]: while load_modules[0:/etc/pam.conf](80eec18, pam_sm_authenticate)=/usr/lib/security//pam_unix_cred.so.1
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 536501 auth.debug] PAM[726]: while load_modules[0:/etc/pam.conf](80eec18, pam_sm_authenticate)=/usr/lib/security//pam_unix_auth.so.1
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 536501 auth.debug] PAM[726]: while load_modules[0:/etc/pam.conf](80eec18, pam_sm_acct_mgmt)=/usr/lib/security//pam_roles.so.1
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 186051 auth.debug] PAM[726]: load_function: successful load of pam_sm_acct_mgmt
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 536501 auth.debug] PAM[726]: while load_modules[0:/etc/pam.conf](80eec18, pam_sm_acct_mgmt)=/usr/lib/security//pam_unix_account.so.1
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 186051 auth.debug] PAM[726]: load_function: successful load of pam_sm_acct_mgmt
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 536501 auth.debug] PAM[726]: while load_modules[0:/etc/pam.conf](80eec18, pam_sm_acct_mgmt)=/usr/lib/security//pam_unix_account.so.1
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 536501 auth.debug] PAM[726]: while load_modules[0:/etc/pam.conf](80eec18, pam_sm_setcred)=/usr/lib/security//pam_authtok_get.so.1
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 186051 auth.debug] PAM[726]: load_function: successful load of pam_sm_setcred
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 536501 auth.debug] PAM[726]: while load_modules[0:/etc/pam.conf](80eec18, pam_sm_setcred)=/usr/lib/security//pam_dhkeys.so.1
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 186051 auth.debug] PAM[726]: load_function: successful load of pam_sm_setcred
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 536501 auth.debug] PAM[726]: while load_modules[0:/etc/pam.conf](80eec18, pam_sm_setcred)=/usr/lib/security//pam_unix_cred.so.1
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 186051 auth.debug] PAM[726]: load_function: successful load of pam_sm_setcred
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 536501 auth.debug] PAM[726]: while load_modules[0:/etc/pam.conf](80eec18, pam_sm_setcred)=/usr/lib/security//pam_unix_auth.so.1
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 186051 auth.debug] PAM[726]: load_function: successful load of pam_sm_setcred
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 536501 auth.debug] PAM[726]: while load_modules[0:/etc/pam.conf](80eec18, pam_sm_setcred)=/usr/lib/security//pam_dhkeys.so.1
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 536501 auth.debug] PAM[726]: while load_modules[0:/etc/pam.conf](80eec18, pam_sm_setcred)=/usr/lib/security//pam_unix_cred.so.1
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 536501 auth.debug] PAM[726]: while load_modules[0:/etc/pam.conf](80eec18, pam_sm_setcred)=/usr/lib/security//pam_unix_auth.so.1
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 707315 auth.debug] PAM[726]: pam_end(80eec18): status = Success

Wednesday Oct 15, 2008

wxWidgets in OpenSolaris

wxWidgets has been integrated into OpenSolaris (build 100) as a shared library now. This will certainly help a lot of wxWidgets GUI applications which can now link to the integrated wxWidgets in seamless manner. According to wxWidgets' homepage, wxWidgets gives you a single, easy-to-use API for writing GUI applications on multiple platforms that still utilize the native platform's controls and utilities. On top of great GUI functionality, wxWidgets gives you: online help, network programming, streams, clipboard and drag and drop, multithreading, image loading and saving in a variety of popular formats, database support, HTML viewing and printing, and much much more.

Actually, wxWidgets existed in Solaris before build 100 but only in a statically linked form with pgAdmin, a PostgreSQL administration/monitoring tool. But, starting with build 100, it can be used as a shared library and dynamically linked to various GUI applications. The current version is wxGTK-2.8.8.

With this integration, you will see 2 new packages being added, as SUNWwxwidgets and SUNWwxwidgets-devel. SUNWwxwidgets includes all the wxGTK related libraries (including the 64bit version) and SUNWwxwidgets-devel include all the headers files that you would need to compile any application that depends upon wxGTK. So, If you are just going to run some GUI based application that depends on wxGTK, you only need to install the SUNWwxwidgets package (which is expected to be installed as a dependency by the package management system anyway). Please note that the OpenSolaris IPS repository contains only one package, SUNWwxwidgets and here SUNWwxwidgets-devel package is combined into the SUNWwxwidgets package.

wxWidgets libraries are currently being built with support for xrc, expat, sdl and opengl. You can look at the ARC materials here.

Application developers can get more information about the installed wxWidgets by doing following,


rangabhoomi % wx-config --version
2.8.8

rangabhoomi % wx-config --libs
-mt -L/usr/lib -R/usr/lib  -L/usr/X11R6/lib 
-L/usr/openwin/lib  -lwx_gtk2u_richtext-2.8
-lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8 -lwx_gtk2u_qa-2.8
-lwx_gtk2u_html-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8
-lwx_baseu_xml-2.8 -lwx_baseu_net-2.8 -lwx_baseu-2.8

So, feel free to try this out and if you find bugs, please log them in the category, solaris/library/wxwidgets.

Friday Sep 26, 2008

Software Freedom Day, 2008

Software Freedom day, Sept 20th, really went unnoticed last year. I dont even remember anybody talking about doing anything specific. But, this year, it was just impossible to ignore all kinds of event notifications coming from all over the world. There were about 100 events planned by the Sun campus ambassador network only in India. In that list of events, I saw some requests for delivering a couple of sessions in pune and could not resist to get involved in this worldwide festival.

Pune Institute of Computer technology (PICT) had organized a two day event on Sept 19th and 20th and I signed up to do a session on OpenSolaris on 20th. PICT was also celebrating 25 years of its existence. Being an alumni it was a perfect setup for me and my involvement also gave me a sense of giving back to my college.

My OpenSolaris talk was well attended by around 60 odd students from both 2nd and 3rd year engineering. I covered Solaris-in-general and OpenSolaris including some key features like DTrace, ZFS, SMF etc. I also demonstrated OpenSolaris installation on VirtualBox. I think this demo was important, as it provides a very convenient way to try out various operating systems and makes a lot of sense for the student community. It was good to know that some folks from the industry as well were attending the event and here is what one of them have to write about OpenSolaris and the event.

I set out some goals for myself from this preso.
    (i) Awareness of Solaris/OpenSolaris.
    (ii) The Magic of VirtualBox.
    (iii) most importantly, Focus on open source.

One thing that I realized after talking to some 3rd year students is that, there are still a lot of students who run behind sponsorships for their final year projects. Self sponsored projects with open-source technologies does not carry a 'wow' factor according to them. I think this should change, students should focus more on joining various open source communities for their projects, that will not only give them  better exposure, but will also add great value to their resume, certainly more than what a certification can do. 


The Sunday morning I presented a couple of sessions at Army Institute of Technology (AIT). There were no additional sessions planned here; so it was a smaller event in comparison. The first session I presented was on basic java programming, that included the java virtual machine, life cycle of a java program and simple how-tos. Given that the audience was just learning programming languages in general (with limited exposure to C and C++), I chose not to go further in detail but to outline major differences between C/C++ and Java.

The second session was again OpenSolaris. It was the same session that I delivered at PICT a day before. The attendance was again around 50 students. After the talk, the sun campus ambassador hosted a quiz around open source technologies and goodies (OpenSolaris CD kits etc) were given away. The talk went way over its scheduled time and we finished the event at about 2:30 pm. I had a big list of questions to answer from the students, which gives me a feeling that it was a success.


Later the same evening we had a POSUG (Pune OpenSolaris User Group) meeting at Fergusson College and I had to do some more opensolaris for them. This meet was basically an ice-braker to students from various colleges in puNe. POSUG has been doing a lot of work lately and certainly carries the potential to contribute more.
It was a really busy weekend doing this social-technical work. and It is always good to go back to colleges, the zest in the students is so refreshing.

Wednesday Sep 03, 2008

Seven @ Sun

I complete seven years at Sun today. This has been a fantastic journey so far and am looking forward to more in coming years.



Looking back upon the last year, one significant thing that I feel very satisfied about is the list of open source projects/initiatives that I contributed to. Although the list of projects is not very long, it is definitely longer than the previous year. I spent most of my time working on PostgreSQL on OpenSolaris. This includes playing with the African elephant (see the pic), integrating Pg Perl drivers into OpenSolaris, tuning/optimizing Pg on Solaris and presenting at conferences and customer events. I also got a chance to work with MySQL on Solaris to a limited extent and I see more of that coming this year. Apart from databases, I got involved in the effort to port some FOSS to OpenSolaris and that will be completed very soon.


The other thing that I enjoyed the most last year is being at developer conferences. Meeting with developers/corporates at Sun tech days in china and India is totally different from being at FOSS.IN, Bangalore; and the experience of PGCon, Canada was beyond any of them. Attending such conferences has widened my exposure immensely and my feel for the way sun's technologies are perceived has improved with such interactions.


Apart from conferences, I got a chance to get involved with students and teachers community in India through Code For Freedom contest and the Sun Guru initiative. I felt a very strong need to drive students to Open source projects after my visit to IIT Kanpur 2 years back (see my blog) and today it makes me feel good that many universities and even other corporates are taking that seriously. I believe Sun is doing a great job here and feel great about my involvement in it.
..and there is always fun @ Sun.


Hmm, another highlight of last year is that I won the first prize in acting in both the local (marathi) play competitions that I participated for my group yuva.
Coming year, I think I need to blog more than what I have been doing so far. So, Lets see how it goes!

Friday Aug 29, 2008

D4X for OpenSolaris (UnSupported)

Downloader4X (a.k.a D4X), a multithreaded download manager, is pretty well known GUI application in the UNIX community. The product has lots of comparable features including support for recursive downloading through both FTP and HTTP protocol. It scores well on the usability aspect as well. These are the reasons, I decided to port it to OpenSolaris and integrate the packages into the JDS repository.

I did an initial port (v2.5.7.1) using the CBE infrastructue and with gcc compiler, and it seems to be working fairly well on OpenSolaris. You can download the SVR4 packages from here.

Though d4x project has a good user base, it seems that the project has stalled now. There has been no release since April 2006 and since recently even their web-site is down. This means that there is probably no hope for new features and there are almost no chances of getting source code level support. These reasons have made it extremely difficult for me to help get this integrated into OpenSolaris package repository. But anyhow, I have the port ready, and I thought I will just put it up on my blog for people who want to play with it.

So, feel free to download and use it, but bear in mind that it is not officially supported.

Wednesday Aug 13, 2008

Backup-Restore using pgAdmin on OpenSolaris

If you really like using pgAdmin to administer you Postgresql server instance, then this tip is important for you.

Solaris/OpenSolaris supports many versions of Postgres. Currently, OpenSolaris supports postgresql version 8.1, 8.2 and 8.3; which means you can install any of these versions from the repository and it will work just out of the box. pgAdmin, a postgresql database administration/monitoring tool (also available in the repository) is not tied to any specific version of the postgres server. So, You can install pgAdmin from the repository and simply connect to the postgres server that you are using.

Now, there is small glitch here. If you are trying to run programs like pg_backup, pg_restore from pgAdmin (Option Backup, Restore on database), then you need to be careful. pgAdmin expects these binaries to be present in the same directory as itself. i.e. /usr/bin. However, different postgresql server binary versions are installed in different locations, such as,


Postgres 8.1 : /usr/bin

Postgres 8.2 : /usr/postgres/8.2/bin

Postgres 8.3 : /usr/postgres/8.3/bin

Now, Lets say, you are using pgAdmin to restore a database of version 8.1, then you are fine. But, if you do not have 8.1 installed, pgAdmin will simply disable these options from the menu, as it would not be able to see the binaries at all. Also, If you have both 8.1  & 8.2 installed, but you are using 8.2 server then pgAdmin will use backup & restore binaries from the 8.1 bin directory, simply because they exist in the same directory as pgadmin. This will result in inconsistent behavior.

The best way to resolve all such issues is to create a symlink to /usr/bin/pgadmin3 from the bin directory of the server you are using. So, e.g., If you are using 8.2, then you could do following,


bash# ln -s /usr/bin/pgadmin3 /usr/postgres/8.2/bin/pgadmin3

and the same for 8.3 as well. Obvious that, this is not required if you are using 8.1 server.

then just include the 'bin' directory  of your server at the begining of your  PATH and you will always use  pgAdmin and the correct backup/restore binaries.

Friday Aug 08, 2008

The OpenSolaris mad-ad Video

The Open Source Mela (Fair), at Sun's India Engineering Center, happened in March, 2008 saw a lot of technical sessions around FOSS technologies. The idea behind this internal event was to foster the culture of open source projects internally. Along with the technical sessions, some fun-filled events were also hosted. One of them was a mad-ad contest.



The above poster was quiet encouraging and some of us (from the Solaris team) decided to participate. We could not come up with anything until just one hour before the contest when we finally got together to brainstorm on what we could present. The following video is what we came up with and it turned out to be a winner.


The song is based on a famous commercial in India. This mad-ad (or rather a jingle?) is in Hinglish (a mix of Hindi and English :) ). Many thanks to Kini for helping us make this video and we hope you will enjoy it.


Saturday Jun 14, 2008

SMF import for IPS packages in opensolaris


Installing postgresql/mysql packages from IPS repository on OpenSolaris 2008.05 is very simple n easy and Jignesh has described the command line steps in his post in detail. I tried the same thing on a fresh install of OpenSolaris, but using the Package Manager GUI and It is as easy as it should get with GUI tools.

The idea behind this blog, is to simply clarify to users/developers that as soon as you install any PostgreSQL/MySQL version, the SMF registry is not going to be updated. This might look obvious to many of you, but I see on some reviews that people are expecting that the SMF service will be installed in the registry.

A subsequent reboot will automatically import necessary entries in the registry or it can be manually added before reboot if desired, as below,

# svccfg import /var/svc/manifest/application/database/postgresql.xml
(for Postgresql version 8.2)

This needs to be done only once and the registry is updated permanently.

Also, Note that registry entries are not cleaned up once you uninstall these packages. You can manually delete them as given below. There is no harm in keeping them in the registry, but they are not going to be useful for obvious reasons.

# svccfg delete svc:/application/database/postgresql

Friday Jun 13, 2008

iPhone users, get FileBrowser over MobileFinder


Today morning when I started the Terminal (vt-100) application on my iPhone, I got the following error.


mv: cannot stat `/var/root/.profile.tmp': No such file or directory
'MobileFinder will now upload the contents of ~/Library/MobileFinder/Sync to ~/iPhone on 192.168.3.29
and then download the contents of ~/iPhone on 192.168.3.29 to ~/Library/MobileFinder/Sync.
You may be asked for your password twice.
/usr/bin/rsync -avz --progress
~/Library/MobileFinder/Sync/ @192.168.3.29:~/iPhone
ssh: connect to host 192.168.3.29 port 22:
Operation timed out
rsync: connection unexpectedly closed (0 bytes received so far)
[sender]rsync error: unexplained error (code 255) at io.c(453)
[sender=2.6.9]/usr/bin/rsync -avz --progress @192.168.3.29:~/iPhone/ ~/Library/MobileFinder/Sync
ssh: connect to host 192.168.3.29 port 22: Operation timed out
rsync: connection unexpectedly closed (0 bytes received so far)
[receiver]rsync error: unexplained error (code 255) at io.c(453)[receiver=2.6.9]
Upload and Download completed.
Press enter to exit...


The terminal wouldnt get to the prompt even after pressing 'enter', and hence terminal was unusable. The problem seemed to be with the MobileFinder (1.8.0) application which I had installed a few days ago. I uninstalled that application but the error persisted.

Google revealed this post that seemed to have the steps to fix this issue. This post has all the steps for Mac users which I am not one. Windoze is then the only alternative. The steps in that post are pretty straight forward and thanks to Stefan. The root cause is the  line,


'. /var/root/Library/MobileFinder/.MobileFinderProfile'
in the file, '/private/var/root/Library/.profile'.


I tried to look for this file using iPhoneBrowser on Windoze and realized that there are some restrictions with iPhoneBrowser software. You cannot look at the real root of the iPhone and also that you cannot look at the hidden files (which .profile is one). The other option of using winscp over a wireless network was not available to me at that time and while looking through the available packages, I stumbled upon File Browser application which seemed to do the trick.

FileBrowser (1.7.0) is actually very smart. It can cut/copy/paste files (but I couldn't get this to work for directories). What more, it can also edit text files with a built in text editor. That is just what I wanted. Open and edit the file is then as simple as it is on the desktop. The only limitation I found of this application is that, even if you edit the 'Settings' to modify the home directory to '/' or '/private', it will always show you files in /var/mobile/ directory. A bit more googling will answer that I am sure, I am just happy to have the current problem fixed at the moment. I found only 'Squid' can show you ALL the files on your iPhone, so far.

So, I will recommend FileBrowser to all iPhone users and squid is also good to have, MobileFinder has some more work to do.

Saturday May 24, 2008

Day 2 @ PGCon 2008


The 2nd day of the PGCon conference also had a good list of hacker/community sessions lined up. The talks started at 10 am instead of the usual 9 am time, may be because, people getting late due to the EnterpriseDB party previous night was anticipated.

I was initially planning on attending PostGIS, but then changed my mind to attend "Deploying PostgreSQL in a Windows Enterprise" instead. Magnus covered how Postgres can be deployed with Active Directory Server connected network. I have been working on Solaris for a long time, so one of my intentions was to understand how different it is to deploy Postgres on windows platform and  possibly get an idea of how widely it is being used. I think my understanding is improved a bit after the talk and have realized that the problems are of similar nature in windoze too.

Later, I walked in "Security Enhanced PostgreSQL" session and it turned out to be a very cool project which I was not really aware of. This project provides fine grained mandatory access control even for the privileged user (such as 'postgres'). It depends heavily on the security context associated with certain tuple/cell. For PostgreSQL to be able to achieve such fine grained control, security enhanced operating system is necessary. KaiGai, the SE-PostgreSQL developer, demonstrated this on SELinux and it was really very exciting. I am now wondering if this can be implemented easily on Solaris 10 Trusted Extensions (Tx). He mentioned that for other operating systems to run SE-postgresql, there is a framework available and only certain modules need to be ported.

Post lunch, I attended "PL/Proxy, pgBouncer, pgbalancer" by Asko from Skype. I had a bit of idea about these tools and have a learnt a lot more about them from this talk. I think Skype contributing a bunch of tools is really appreciated. For a postgresql dbms user company to be able to solve their practical problems by creating tools that will help many many other users is really very creditable. pgProxy seems to be a really cool idea and the combination with pgBouncer seems to be really useful for customizing specific deployments which are exposed to heavy load. Kudos to the Skype team working in the PostgreSQL community!

For the next talk, "Performance of PostgreSQL", the speaker, I think at the last moment, decided to get a translator friend for his talk. I was disappointed by the  content of the talk. Lots of data was presented but it did not take long to realize that the tests were not performed taking all the aspects into consideration. That sort of took all the flesh out of the data presented. The translator did a good job though.

Zdenek then presented his findings and approaches on 'In-place upgrade' project. He demonstrated a working version of live upgrade from 8.1 to 8.2. He then presented various approaches to implement the same for other latest versions. Version 8.3 and later has some changes to the on-disk format which is complicating such conversion. The talk was  received very well. It was quite evident that the hacker community is really serious about this project and hence it will be interesting to see how the project shapes up in the near future.

Dan did a great job (again!) with his closing session. I think he was phenomenal in making this conference a huge success.

Most of us got together at the Royal Oak pub for the last time this year. I have never been to pubs for so many consecutive days in my life, but It was a lot of fun! Many of us are meeting up for a sightseeing tour tomorrow and then I will leave Ottawa on sunday to go to Niagara Falls and then back to India.

Friday May 23, 2008

Day 1 @ PGCon 2008


On the first day of the main conference here at PGcon, I was awake early with continued excitment of having won the Nintendo Wii and a slight hangover. I got ready early and after finishing some mails headed for breakfast. I was feeling good not only about the Wii but also because of the fun and the geeky mood here at the conference. The last 2 days had been fantastic with the tutorials and the start of the main conference today with a very interesting line up of talks was very exciting.

After the breakfast we arrived at the venue of the conference where registrations were still going on. The opening talk (keynote) by Bruce was good. The main focus for the next years for postgresql is clear. The project will work towards making effective use of multicore/multithreaded systems which are becoming a commodity now. It made total sense to me.

The first session I attended was "postgresql: from a Java Enterprise point of view". Given my long association with Java as a developer I thought this will be interesting to see how fellow java developers think of postgresql. The talk covered the J2EE aspects of entity beans, EJB/QL fairly in detail with changes in advanced versions. I was also hoping to hear how postgresql is perceived in J2EE application developer community, but that was not covered. It was more of PG user - Java developer talk than for the hackers.

I attended Logic and databases session with no expectations but simply thinking what would be the content of this one. I thought it was a very interesting talk for the users/hackers going back to the basics of relating logic to the query language and how a better understanding of this could improve the queries that one writes. Well, I learnt about some good pitfalls and that helped improve my understanding. Thanks Jeff.

then I attended Susanne's talk on "What PG could learn from MySQL". She put together the content based on her experience and with some help from her colleagues both in PG and MySQL commuity. Her analysis was based on various aspects like development model, packaging, User interface, user/customer focus and I agreed with most of the data that she presented, but not necessarily all the conclusions. One thing I liked about the pg hackers during the talk was that they were very receptive about what she had to present and I am sure that will certainly help postgres project.

"Problems with PostgreSQL with multi-core systems with Multi tera-byte data" by Jignesh Shah. To me, this was the best talk so far at the conference. He presented his study with a lot of data on the performance of postgres on multi-core high end systems. The graphs were complicated but he made some very good points about implementaion 0f postgres and also presented his thoughts on how this can be improved. It was a very detailed talk and I must say very well presented to the hacker community. I really felt excited about the performance of postgres if we resolve some of the problems with it today and I saw similar expression on everybody else' face after the talk. The points Jignesh made will surely help postgres to achieve their goal for the next few years, I believe. Boy! I love dtrace!!

I wanted to attend search.postgresql.org to see how good the new search system on postgres website is going to be and it looks really promising. I am sure it will be very helpful for all the hackers and more useful for the novice ones like me.

I was very excited about the last talk "Multi threaded query accelarator". The idea of multi threading at the application level giving high overall performance with pg backend was certainly exciting. Not only that, they have also deployed such solution in production made me walk into that room instead of going to the lightining talks which I are always more fun. The talk presented detailed design of their systems and some analysis on how multi-threaded application could improve the overall performance. I personally thought, their database design was not too complicated which allowed them to get performance even if they added some complexity at the application level. Also, I felt, multi threading at application level is going to give performance boost of limited range for OLTP and data-warehousing applications. This is in a way obvious and got confirmed from the presentation to me.

I could attend some of the lighting talks and happy that I didnt miss out on DBIx::cache and dtrace ofcourse!

EnterpriseDB hosted dinner & drinks at a local pub and I must thank them for the nice food/desert and drinks they arranged and yes, a free Tshirt. :-)

Socialising is always good !

Friday Mar 28, 2008

PostgreSQL, MySQL and Java DB at Sun Tech Days, Hyderabad 2008

Sun Tech days Hyderabad kept its promise of bringing thousands of techies to the conference even this year. Total 7000 people attended this conference that ran over three days in the last week of february. Like last year, student community dominated the number of registrations, but the number of developers from the Indian IT industry was still quite a significant percent of the total number. The conference had total 4 tracks running in parallel on the first 2 days and the last day, also called as the Open Source day, had in fact 5.

I presented 2 sessions this year. "PostgreSQL and MySQL, the databases inside Solaris" in the Solaris track on the first day and "MySQL and Java DB, the databases for Java developers" in the community track on the second day.

TalkAbout 300 people attended my session in the Solaris track and it was received very well. The recent announcement of MySQL aquisition helped here, I believe. I discussed features of both PostgreSQL and MySQL and also compared both of them specifically where they overlap. Also, I discussed how Solaris currently integrates these 2 databases and future plans with WebStack. I also presented the PostgreSQL + Zones and postgreSQL DTrace demo, which... worked.

Not so surprisingly, people seem to have been using these 2 databases already. This was evident from the questions I faced at the end. Issues such as Indic language support for PostgreSQL also came up. Unfortunately, This particular point need more attention in the PostgreSQL community and I think, if anybody has to do this, it has to be the Indian language experts. I also think solving this issue is critical for the success of OSDB with Govt of India adopting open source technologies in a big way. People also asked doubts on the comparison between these 2 databases, I was able to answer many of these. I received a comment on the talk, "I was always confused with these 2 databases and this talk has cleared a lot of that.", which is very satisfying.

The other talk was with the series of Java related talks and had much larger audience. Total, 1192 people attended this session and it is the biggest audience I have ever had. The repeat audience from the previous talk was minimal, about 1-2 %. Here, I introduced Java DB and also discussed/compared its feature set with MySQL. The later part of the presentation was focussed more on developing Java database applications. I presented the DerbyTaxdemo and also wanted to show Roumen's "Generating RESTful clients with MySQL using Netbeans" demo, but my Compiz-on-KDE crashed Netbeans and I could not show the demo.

OSDB BoothApart from the 2 sessions, we had a OSDB booth that was manned by Wei-chen and Saurabh Vyas. I spent most of my time at the booth. The booth was located right next to the conference hall and it was crowded all the time.

This year, the event was special for a lot of reasons. It is the 10th anniversary of tech days. We had Software EVP, Rich Green, MySQL Co-Founder David Axmark and Ian Murdock doing the keynotes. We also had a famous indian music band, Euphoria, performing and a fashion show for the audience. This was the first time I presented at the tech days and it was very special because it was also the first time MySQL was covered at Sun Tech Days and I feel honored for being associated with that.

Wednesday Feb 06, 2008

Perl DBI & DBD::pg inside the latest SXDE 01/08

The new released SXDE (01/08) bundles Perl DBI and Perl DBD::Pg along with many other web-stack components. This piece of integration I volunteered to do with a selfish personal goal of contributing more to the OpenSolaris codebase. It has been a great experience of following the entire Solaris integration process for the first time. With SXDE 01/08, the 2 components are out there for people to use.

DBI is a generic database Interface for Perl applications and DBD::Pg is the PostgreSQL specific database driver  which implements the DBI interface. Both these perl modules are integrated into latest Solaris. These components are ready to use once the OS is installed and no other configuration is required.

A simple usecase is as below,

 
First, Make sure that PG8.2 Service is running, else you need to enable the postgresql:version_82 service to start the PG postmaster.

bash-3.2$ svcs -a | grep postgres
disabled        6:03:01 svc:/application/database/postgresql:version_81
online          6:03:16 svc:/application/database/postgresql:version_82

Create a small database that we will try to access through a perl application using DBD::Pg.

bash-3.2$ /usr/postgres/8.2/bin/createdb testdb
CREATE DATABASE
bash-3.2$ /usr/postgres/8.2/bin/psql testdb
Welcome to psql 8.2.5, the PostgreSQL interactive terminal.

Type:  \\copyright for distribution terms
       \\h for help with SQL commands
       \\? for help with psql commands
       \\g or terminate with semicolon to execute query
       \\q to quit

testdb=# create table t (id int);
CREATE TABLE
testdb=# insert into t values (1);
INSERT 0 1
testdb=# insert into t values (2);
INSERT 0 1
testdb=# select \* from t;
 id
----
  1
  2
(2 rows)

testdb=# \\q

Write the perl app that will talk to this database. Here, we simply do a select on the table created above.

bash-3.2$ cat test.pm
use DBI;

$dbh = DBI->connect ( "dbi:Pg:dbname=testdb","","" ) ;
if ( !defined $dbh ) {
        die "Cannot connect to database!\\n";
}

print "Success connecting!\\n";

$sth = $dbh->prepare ( " SELECT t.id from t" ) ;
if ( !defined $sth ) {
        die "Could not prepare statement\\n";
}
$sth->execute;
while ( @row = $sth->fetchrow() ) {
        print @row,"\\n";
}

$sth->finish;
$dbh->disconnect;

Now, run the perl module to see the result. 

bash-3.2$ which perl
/usr/bin/perl
bash-3.2$ perl test.pm
Success connecting!
1
2
bash-3.2$

With DBI already in Solaris now, other drivers will also follow soon.

So, Go ahead and use them and Do not forget to file bugs if any, here.

Thursday Jan 31, 2008

First contribution to Apache derby from Code For Freedom contest

Code For Freedom Contest, as part of the university program at Sun has been running for a few months now. Apache Derby is one of the 5 Open source technologies participating in this contest. We recently had our first contribution to the Apache Derby project through this contest. Jazarine Jamal, a student from Amrita University has contributed Derby-2239.

Apache derby has not been very active project in this contest until very recently when a bunch of students from this University started participating. I have been working with few of the students as their mentor to take them through this fun ride. Last few weeks has been a great mentoring experience for me chatting with them to get their way through building, reproducing, debugging Apache derby code in Netbeans.  The students have shown great amount of interest and sincerity in their activities and I feel happy that we have crossed the initial hurdles now and have established some expertise in the college which other students can leverage. I really appreciate the traction generated among the students by their faculty member Mr. Vipin as much as the enthusiasm shown by the students.

There are some more contributions in the pipeline and  I am looking forward to many more from this college. It is a great success of the contest that it has built a good platform for many more contributions to Apache derby and it will hopefully continue to grow even beyond the scope of this contest.

Thursday Nov 29, 2007

Apache Derby now tested with phoneME advanced

Apache Derby is now tested with the open source JavaME CDC stack, popularly known as phoneME advanced platform. The Apache derby community recently carried out this exercise and it did not take them long to flag GREEN.

So, Try Apache derby on phoneME advanced !

For more information on the Java ME support, please follow the Apache Derby Wiki page.
 

About

user13377336

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today
Bookmarks
Blogroll

No bookmarks in folder