I have a several years of experience developing web applications with PHP and I've also worked with Java extensively (however never for web application development). I'm completing a large project that I've been working on for the past six months built in PHP/CodeIgniter and hosted with CloudControl (provides automatic server provisioning and scalability).
The project has gone well, and PHP served my needs - but now I'm in the beginning phase of developing a web application that will be targeted towards enterprise users and I'm considering using Java (possibly 'Grails') in conjunction with AWS Elastic Beanstalk.
My first question is: multi-threading, how often is it used in web application development for Java? With my PHP app, my server might have been required to make an API call to facebook in response to a user's request (say post to a user's wall). To avoid having my PHP process wait on the API call completing before returning to the user, I used Gearman job queing servers w/ workers to offload the work from my primary application server to a background worker.
Would a Java developer simply spin up a thread just to handle the API call and have the main process return to the user? Is this the biggest strength of Java development over PHP? Thanks!