Business Delhi India New Delhi Technology

Calling all Startups!

Startup Saturday Delhi is just around the corner. We’re holding our next event on the 14th of March at the American Center from 2pm to 6pm. The goal of Startup Saturday is to give startups a place where they can showcase their products and their businesses. Our goal is to also allow entrepreneurs and those considering a life as entrepreneurs to share information, learn from each other, and be a part of building the entrepreneurial ecosystem in India.

If you’re a startup or know of any Indian startups that would like to publicize their products/services, please fill out the Demo Nomination form so we can get you on the Startup Saturday Delhi agenda.

Looking forward to seeing you at Startup Saturday Delhi!

Apple Database iMac MacBook MySQL OS X

MySQL 64bit, Perl 32bit and OS X Leopard

This is a little tip on how to get Perl(32bit) working with a 64bit version of MySQL on OS X Leopard.

I was working on a small project today that required MySQL 5.067 and I opted to do it in Perl 5.10. You may remember a post that I put up in August describing how to compile MySQL 64 bit for OS X Leopard. Well, since then I also compiled and installed Perl 5.10 (not replacing Apple’s system install of Perl). I wanted to take advantage of some of the Perl 6 features that have been backported to Perl 5.10 (the first Perl release in two years).

Back to today’s project, I decided to use the awesome Class::DBI Perl module to do my little project. I wrote all my code and began to run it in the perl debugger and realized that I need to install the DBD::mysql module. During the installation process for DBD::mysql, the Perl module is compiled using the mysql libraries and header files. Compilation wasn’t a problem. It’s when we got to the ‘make test’ step that all hell broke loose.

To cut a very long story short, I kept getting the error below:

# Failed test 'use DBD::mysql;'
# at t/00base.t line 21.
# Tried to use 'DBD::mysql'.
# Error: Can't find 'boot_DBD__mysql' symbol in /Users/pankaj/.cpanplus/5.10.0/build/DBD-mysql-4.010/blib/arch/auto/DBD/mysql/mysql.bundle

I dug around a bit and decided to run the installation manually. The problem here has to do with compiler flags that were used for mysql. MySQL was compiled as a 64 bit Leopard binary. However, Perl 5.10 was compiled as a 32bit binary because many Perl modules don’t support 64 bit out of the box.

To solve the problem, I had to recompile the mysql client libraries:

--($:~/src/mysql-5.0.67)-- export ARCHFLAGS="-arch i386"
--($:~/src/mysql-5.0.67)-- CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors \
-fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql.32 --without-server --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --enable-shared
--($:~/src/mysql-5.0.67)-- make
--($:~/src/mysql-5.0.67)-- make test
--($:~/src/mysql-5.0.67)-- sudo make install

Once the mysql client libs were done compiling and installed into /usr/local/mysql.32, I changed my PATH to ensure that the newly compiled mysql libraries and binaries were picked up before anything else.

export PATH=/usr/local/mysql.32/bin:${PATH}

Once that was done, I went back to my DBD::mysql source directory and built it using the following commands:

--($:~/src/DBD-mysql-4.010)-- perl Makefile.PL --libs="-L/usr/local/mysql.32/lib/mysql -lmysqlclient -lz -lm" --cflags="-I/usr/local/mysql.32/include/mysql"
--($:~/src/DBD-mysql-4.010)-- make
--($:~/src/DBD-mysql-4.010)-- make test
--($:~/src/DBD-mysql-4.010)-- sudo make install

This time, make test ran beautifully with a few minor exceptions because I didn’t actually give it a mysql db to connect to.

The mysql 32bit client can easily connect to the 64 bit server. Perl, Class:DBI are now very happy and the application is running as planned.

Open Source

OSSCamp Delhi – September 2008

OSSCamp is gearing up for another meet on September 27th and 28th in Delhi. The volunteers have just spent a great deal of time and energy rebuilding the site and it looks great. Take a look at the site, sign up, think of a way to participate and join us on the 27th and 28th for some great talks on Open Source technologies and meet some really cool geeks 😉

India Mobile Web 2.0

India to Leapfrog Web 2.0 to Mobile 3.0

Much like India missed the industrial revolution, it is clear that India is going to miss the Web 2.0 revolution as well. There are many “Web 2.0” startups in India and some have been doing well, e.g. Zoho and SlideShare but that’s mainly due to an international user base and not indigenous Indian users.

I’ve been hard pressed to find an Indian Web 2.0 company, doing well and making money by serving the Indian subcontinent. The simple reason for this is that there are just not enough Indian computer and Internet users. Most casual Internet users will check stock prices, buy an airline ticket, look for a job, check their email, hit a social networking site and chat with others. There is a younger Indian demographic that is heavily using social networking sites like Facebook and Orkut but the amount of time they spend on these social networking sites is questionable.

Beyond the tech-savvy in India, very few people have heard of Wikipedia, Digg or the power of social media. The social “web” is taking form in India but not as most of us from the West have experienced. I predict that India will mostly leapfrog Web 2.0 and go directly to Mobile 3.0. Mobile 3.0 being highly personal, highly location specific products and services that allow 3G+ phones and even lower-end phones capable only of SMS to become part of the social fabric of the Web. There shouldn’t be any distinction between the Internet and Mobile platforms. One is just an extension of the other. As innovative user interface designs are produced, India’s 250 million mobile users can be brought into the social web much more quickly and provide them with true value which, unfortunately, they aren’t aware exists on the Internet today.

The largest impediment to bringing these 250 million people into the social web is going to be cost and the carriers holding the golden keys. Expecting the carriers to work with these small startup companies will be difficult at best. Not to mention, Indian carriers have a very bad reputation of bleeding their partners dry. They also have brought the “walled garden” to mobile phones. Companies like Airtel try to push their “Airtel Live” services instead of unfettered GPRS/EDGE. Maybe it’s not such a bad thing right now to allow non-tech-savvy people access to a limited online mobile experience, the way AOL gave subscribers an online version of a walled garden in the late 80’s and 90’s. Users will eventually outgrow the walled garden and seek more.

Estimates put the Indian mobile VAS space at about USD 1 Billion in March of 2008 and predict that it could hit USD 2 Billion by the end of 2008. These aren’t numbers to sneeze at. It’s just the beginning of the mobile application usage. Today, over 40% of VAS revenue comes from SMS. As smartphones like the Nokia N96, Blackberry Bond, Nokia E71, and Apple iPhone penetrate deeper into the Indian market, the desire for richer mobile applications connecting people together will only grow.

Apple MySQL Open Source OS X

Running MySQL on OS X Leopard

I’ve recently gotten back into some development and needed to run MySQL on my Leopard computers. The easy way out was downloading and running MAMP (a great pre-built package of Apache and MySQL). Unfortunately, I hated starting the Apache and MySQL daemons manually.

I created OS X launchctl scripts to start Apache and MySQL but I hated the fact that I was maintaining two installations of Apache (the one that comes with OS X and the MAMP one). I wanted one simple installation of everything that would start automatically. Also, occasionally, weird things would happen with permissions and I’d have to shut everything down and restart again.

It’s been some time since I compiled my own software so I was looking forward to compiling MySQL from scratch. The first thing I found was this great post on Hivelogic about compiling MySQL. I’m not going to regurgitate what’s in the post but I’m going to highlight the configure flags for Leopard. Most times, when compiling applications, getting all the flags right is the only way to ensure your specific OS and architecture are properly supported in the compilation process and it’s the only way to squeeze out the best performance.

CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXX=gcc \
CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors \
-fno-exceptions -fno-rtti" \
./configure --prefix=/usr/local/mysql \
--with-extra-charsets=complex --enable-thread-safe-client \
--enable-local-infile --enable-shared

Make sure you change your root (data base administrator password) by running:

/usr/local/mysql/bin/mysqladmin -u root password 'new-password'
/usr/local/mysql/bin/mysqladmin -u root -h localhost password 'new-password'

Don’t forget to secure your server as indicated on HiveLogic.

My plist file for automatically launching MySQL under MAMP is here. Feel free to compare it to the post at HiveLogic or change it to suit your needs. If you have any suggestions on how to improve it, please let me know.