Questions about Java for web development from a PHP developer

I have many years of experience developing web applications with PHP, and I have also worked extensively with Java (but never for developing web applications). I am completing a large project that I have been working on over the past six months, built into PHP / CodeIgniter, and hosted with CloudControl (provides automatic server provisioning and scalability).

The project went well and PHP met my needs, but now I am in the early stages of developing a web application that will target corporate users, and I am considering using Java (possibly "Grails") to connect with AWS elastic beanstalk.

My first question is multithreading, how often is it used in developing web applications for Java? With my PHP application, my server might need to make an API call to facebook in response to a user request (for example, a message to the user's wall). To avoid having my PHP process wait for the API call to complete before it returns to the user, I used server jobs to work with the Gearman server with workers to upload work from my main application server to a background worker.

Can a Java developer just scroll the thread just to handle the API call and return the main process to the user? Is this the biggest power of Java development over PHP? Thank!

+5
1

Java API ?

.

, - , , ... . ( ... 2 .)


-, Java-, . API . , , . , -, ... () .

Java ​​ . , , -, . , , ... API- , , ( ) Java.

, , .


. API - .

, "" , . , , .

+2

All Articles