Let me understand following things:

  1. What's going on underneath the hood when thrift allows PHP "speak withInch Java.

  2. How Apache, Apache Tomcat etc can handle multiple customers/ demands concurrently.

  3. Threads (in context of servers especially) and processess

  4. Why Nginx may be much better than Apache when the first is lengthy polling and why lengthy polling is preferable to periodically polling a server

Brief solutions to every question are certainly welcome but more to the point Let me be pointed to some couple of assets (books, lessons, names of courses etc) that provide us a foundation for considering related issues once they arise.

1) Let me understand what's going on underneath the hood when thrift allows PHP "speak withInch Java.

For specific ways how thrift will it, you need to most likely browse the thrift wiki.

Swapping information between different programming languages can be achieved via a variety of techniques. Recent attempts to standardize these led to CORBA and Cleaning soap, for instance.

2) Let me know how Apache, Apache Tomcat etc can handle multiple customers/ demands concurrently.

Again, for specific ways how Apache will it, browse the apache documentation or source.

Generally, researching Os's, processes, threads might enable you to get began, along with the TCP/IP stacks and Ports.

3) Let me understand threads (in context of servers especially) and processess

Any decent course on Os's will introduce these terms for you.

4) Let me realise why Nginx may be much better than Apache when the first is lengthy polling and why lengthy polling is preferable to periodically polling a server.

Again: specific items, specific websites.

About why (or when!) lengthy polling is preferable to periodically polling: it is dependent around the situation. Both ways features its own pros and cons.