From the course: Advanced Java: Threads and Concurrency

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

The need for a new concurrent programming model

The need for a new concurrent programming model - Java Tutorial

From the course: Advanced Java: Threads and Concurrency

The need for a new concurrent programming model

- [Instructor] Typically, every application that we use today like online shopping, travel booking, banking, and et cetera, are all server applications. All these server applications handle millions of client requests performing blocking I/O operations like fetching or accessing external resources, such as remote databases, REST APIs, and et cetera. These are known as high-throughput applications. Imagine for example, that this type of an application has code like this. This has mainly three tasks that will be executed by threads. The second task, that sendRequest, is a network call to access an external resource. So this is a blocking I/O operation. A regular or classic Java thread that runs this type of blocking task code will be idle for some time, waiting for a response back from other servers. This is a waste of computing resources, mainly RAM and is a major barrier in achieving high throughput. Let's take a closer look at this. A classic or regular Java thread, which is more…

Contents