- Virtual Threads in JDK 21: Revolutionizing Java Multithreading
What is Virtual Thread
Multi-threading is a widely used feature across the industry for developing Java-based applications. It allows us to run operations in parallel, enabling faster task execution. The number of threads created by any Java application is limited by the number of parallel operations the OS can handle; in other words, the number of threads in a Java application is equal to the number of OS threads. Until now, this limitation has created a bottleneck on further scaling any application, considering the current fast-paced ecosystem.
To overcome this limitation, Java has introduced the concept of Virtual Thread in JDK21. A Java application creates a Virtual Thread and is not associated with any OS thread. It means every Virtual Thread does not need to be dependent on a Platform Thread (aka OS thread). Virtual Thread will work on any task independently and will acquire a Platform Thread only when it needs to perform any I/O operation.
- How to Test POST Requests With REST Assured Java for API Testing: Part II
In the previous article, we learnt the basics, setup, and configuration of the REST Assured framework for API test automation. We also learnt to test a POST request with REST Assured by sending the request body as:
- String
- JSON Array/ JSON Object
- Using Java Collections
- Using POJO
In this tutorial article, we will learn the following:
- Designing Java Web Services That Recover From Failure Instead of Breaking Under Load
Web applications depend on Java-based services more than ever. Every request that comes from a browser, a mobile app, or an API client eventually reaches a backend service that must respond quickly and consistently. When traffic increases or a dependency slows down, many Java services fail in ways that are subtle at first and catastrophic later. A delay becomes a backlog. A backlog becomes a timeout. A timeout becomes a full service outage.
The goal of a reliable web service is not to avoid every failure. The real goal is to recover from failure fast enough that users never notice. What matters is graceful recovery.
- Stop Writing Excel Specs: A Markdown-First Approach to Enterprise Java
Design documents in Enterprise Java often end up trapped in binary silos like Excel or Word, causing them to drift away from the actual code. This pattern shows how to treat Design Docs as source code by using structured Markdown and generative AI.
We've all been there: the architecture team delivers a Detailed Design Document (DDD) to the development team. It’s a 50-page Word file, even worse, a massive Excel spreadsheet with multiple tabs defining Java classes, fields, and validation rules.
- Web App Load Testing Using Maven Plugins for Apache JMeter, and Analyzing the Results
In this article, we will walk you through how to conduct a load test and analyze the results using Java Maven technology. We'll covering everything from launching the test to generating informative graphs and tables.
For this demonstration, we'll utilize various files, including Project Object Model (POM) files, JMeters scripts, and CSV data, from the jpetstore_loadtesting_dzone project available on GitHub. This will help illustrate the steps involved and the functionality of the necessary plugins and tools. You can find the project here: https://github.com/vdaburon/jpetstore_loadtesting_dzone.