Web development: LAMP: which programming languages should be used: Some thoughts

Now a days people keep asking which technology stack to be used for web development (LAMP, Java, Microsoft) and finally which programming language mainly server-side. Most of the expert says that use whichever you like and comfortable and I totally agree. If you intend to use Java and Microsoft based env then you don’t have much choice but if you are using LAMP stack then you have a lot of options so question again arises which language should be used? Again, I personally think that decision should mainly on based on the requirement, experience, comfort, team etc. Still here is my take based on my little own experiences working with languages:

Perl:
Pros: Old fellow still widely used, Very powerful, secure, well tested over the years in web dev, very good market repo among users, huge collection of open source libraries, new framework like Dancer, Mojolicious are positive sign.
Cons: Difficult to maintain (dirty syntax etc), Hard to get resources, industry is not very positive about its future versions.

Python:
Pros: Powerful, widely used in handling scientific data, academics, analytics, system administrators, Market sentiment is positive, Very good framework like Django.
Cons: Less flexible, performance issues mainly threading.

PHP:
Pros: Most preferred language, widely used, fast development, big community, huge available resource pool.
Cons: Some reported security loopholes, Less trustworthy, Market image as cheap and dirty option for quick development, multi-threading issue, debugging issues.

Ruby:
Pros: Very flexible, good support, positive image in communities, Very popular framework for web development (ROR).
Cons: Some benchmarks shows that its request-response time is a bit slow than others in same category, Getting good resources can be difficult.

Again few things differ project to project so choose based on your own requirement.

I personally prefer Perl 5.

Import RDBMS table to HDFS with sqoop from postgreSQL

Steps:

1. Download JDBC driver

http://jdbc.postgresql.org/download/postgresql-9.3-1102.jdbc4.jar

 2. Copy: cp /home/cloudera/Desktop/postgresql-9.3-1102.jdbc4.jar /usr/lib/sqoop/lib/

3. Configure: /var/lib/pgsql/data/pg_hba.conf file. You need to allow the IP/host of machine running hadoop.

Restart postgreSQL using pg_ctl restart

4. Run sqoop: Open the terminal on machine running hadoop and type the below command.

cloudera@cloudera-vm:/usr/lib/sqoop$ bin/sqoop import –connect jdbc:postgresql:                                  //192.168.0.34:5432/Testdb –table employee –username postgres -P –target-dir   /sqoopOut1 -m 1

Enter password:

 

prerequisites:

  • Cloudera hadoop VM distribution or any other machine running hadoop.
  • postgreSQL installation.
  • database Testdb and employee table on a running instance of postgreSQL (e.g.; 192.168.0.34:5432 in point 4).

 

All set! Your pgsql table data is now available on HDFS of  VM hadoop cluster.

 

Enjoy hadoop learning!

Citrus Perl Raspberry Pi dev

Anyone interested in GUI Perl dev in Pi? Please go through the link here and download the distribution from sourceforge project site.

I am using Citrus Perl on Pi (Raspbian Wheezy OS) for quite some time ..no major issue.

 

Enjoy GUI dev on Pi .

 

Links:

http://raspberrypi.citrusperl.com/perl

http://www.citrusperl.com/

 

Cracking the Primes – a primality-proving algorithm

Know Your Indian Prime Man !!!!!  Man behind AKS Primality Test algorithm

Dr. Manindra Agarwal’s Journey to the Primality Testing Algorithm

 

References:

http://gpwrite.wordpress.com/2012/06/01/cracking-the-primes/

http://shashank7s.blogspot.in/2012/06/know-your-indian-prime-man-dr-manindra.html