Posted in General Utility

Can’t run Java plugin in Chrome for Mac OSX after installing Oracle JDK 7?

If you are using Mac OSX (i am on Lion)  and you just installed Oracle JDK / JRE 7  your Java applets in Chrome will stop working. You will basically be told Chrome does not support Java 7 on the Mac platform. A 64-bit browser (Safari or Firefox, for example) is required to run Java 7 on Mac OS X. 32-bit browsers such as Chrome do not support Java 7 on the Mac platform. Continue reading “Can’t run Java plugin in Chrome for Mac OSX after installing Oracle JDK 7?”

Posted in Frameworks, Programming

Difference between Multi-Threading and Parallel Programming

Since the use of multi-core computers / PCs is common these days, there are more and more parallel programming frameworks coming up. If you use Scala (or Java)  you might have used the AKA framework which is based on Actors. In java 7 there are the Fork/ join APIs.  However you might ask why do we need these , since multithreaded apps are already quite common. If you use Servlets and so on you are automatically using multiple threads and JVM is a beast when it comes to scaling up using threads and utilising multiple cores.  Continue reading “Difference between Multi-Threading and Parallel Programming”

Posted in Programming

Writing a custom Nginx module – Sample Hello World Module

If you want to write a custom Nginx module, Emiller’s guide is a very good starting point. This article is a wee bit long and you might want to get your hands dirty just to see a full program. In this case you can find this hello world module useful.

I found both of them useful, but the hello world program was  simplistic enough for me to miss some concepts, so i wrote this improved hello word module. Continue reading “Writing a custom Nginx module – Sample Hello World Module”

Posted in SOAP, Web Development, Web Services

Error handling in SOAP Web Services – The Right Way

I have seen too many web services (and done a few) where fault handing is not user friendly / graceful.  Most of the times the way people code the web services using annotations or using POJOs in  frameworks like Axis2 the SOAP faults just contains an error message since this is the easiest thing to do. However for  clients this is not too friendly as they can only do error handling  based on your error strings. SOAP 1.2 specifications here , provide a better way of populating your SOAP faults. That is to provide at-least SOAP codes, sub-codes and a fault string as well as details (if possible). This is old news, but i still thought should be talked about.  Continue reading “Error handling in SOAP Web Services – The Right Way”

Posted in Database, PostgreSQL, Replication

PostgreSQL Replication Options

Based on different parameters, reuirements etc you have the following popular options.

  • Block level replication – DRBD
  • PostgreSQL Streaming replication (SR)– only available 9.0 +
  • Slony Trigger based replication – Almost the gold standard for Master – Slave replication
  • Bucardo – Perl based multi master Async replication
  • pgPool- II – Load balancer, Query cache, connection pooller , Replication manager
  • pgCluster – multi-master synchronous replication

Continue reading “PostgreSQL Replication Options”