In this Engineering With Java newsletter edition, we have hand-picked some interesting Java and Spring articles worth reading. These articles include topics such as Spring AI, SQL query optimization, Java collection with thread, record a JFR log, Spring security best practices etc.
I hope you will like the selections!
🚀 Unlock Your Path to Success with the Ultimate Everything Bundle! 🚀
Introducing the Everything Bundle — your one-stop solution to mastering Java, Spring Boot, SQL, acing interviews, and securing certifications!
1. Spring AI: How to Write GenAI Applications with Java
This article discusses building Generative AI (GenAI) applications with Java using the Spring AI framework, specifically focusing on Retrieval-Augmented Generation (RAG) techniques.
GenAI, a subset of artificial intelligence, involves creating new content like text, images, or music. RAG enhances the accuracy of AI models by incorporating external knowledge sources.
2. SQL Query Optimization: How to Identify and Optimize Slow SQL Queries
This article discusses strategies for identifying and optimizing slow SQL queries, particularly in relational database management systems like PostgreSQL, MySQL, MSSQL, and Oracle.
It highlights common challenges in finding slow queries, such as high query volume, missing indexes, complexity, and the limitations of ORM frameworks like Hibernate.
3. Java Collections and Their Thread-Safe Versions
This article discusses Java Collections and Their Thread-Safe Versions overviews various Java collections and their thread-safe counterparts, including Lists (ArrayList and LinkedList), Sets (HashSet and TreeSet), and Maps (HashMap and TreeMap). For each collection type, both the standard implementation and its thread-safe alternatives are explained
🚀 DSA for the Cracking the Coding Interview. Animated Examples for Faster Learning and Deeper Understanding. 🚀
Java Data Structures & Algorithms + LEETCODE Exercises
Bestseller | Rating: 4.7 ⭐/5 (5k+ ratings) | 36k+ students
4. Remotely Recording a JFR Log from a Container (Without Using the Command Line)
This article provides a guide on remotely recording a Java Flight Recorder (JFR) log from a container without using the command line. It starts by highlighting the importance of JFR in recording JVM and system metrics and its typical usage via command-line commands.
However, in scenarios where direct access to the command line is not available, such as when the JVM is running in a container, the article offers a solution using JVM's JMX connector and Azul Mission Control.
5. Comparing Two-Factor Authentication Methods in Spring Boot
This article explores various two-factor authentication (2FA) methods and their implementation within Spring Boot applications. It begins by emphasizing the importance of 2FA in web application security and its role in safeguarding user accounts against unauthorized access.
The methods covered include SMS-based, email-based, push notifications, authenticator apps, hardware tokens, and biometric verification, each dissected in terms of implementation, security benefits, and user experience considerations.
6. Overview of Security Best Practices for Java Applications in the Cloud
This article delves into essential security measures for safeguarding Java applications in cloud environments. It underscores the significance of understanding the shared responsibility model, delineating the security obligations between cloud providers and clients.
Cloud providers are responsible for securing the underlying infrastructure, while clients manage the security of their applications and data.
7. Empower Your Spring Boot Development with These Top Design Patterns
This article emphasizes the importance of leveraging design patterns as trusted sidekicks in Spring Boot development journeys. By adopting these established solutions, developers can navigate complex challenges more effectively, streamline their code, and maintain smooth-running applications.
8. The Mechanism Keeping Your Java Memory Safe: An Introduction To Garbage Collection
This article provides an introductory overview of garbage collection in Java, elucidating its significance in managing memory and ensuring the safety and efficiency of Java applications.
Garbage collection is portrayed as a fundamental mechanism that automates memory management by identifying and reclaiming unused objects, thereby preventing memory leaks and heap exhaustion.
9. Inheritance vs. Composition in JPA
This article explores the concepts of inheritance and composition in the context of Java Persistence API (JPA), elucidating their differences, use cases, and implications for designing data models in JPA-based applications.
Inheritance entails creating a class hierarchy where subclasses inherit properties and behaviors from a superclass. JPA offers several inheritance strategies, including single table, joined, and table per class, each with its advantages and drawbacks.
10. Save Child Objects Automatically Using JPA
This article explores various approaches to automatically saving child objects when persisting parent entities using the Java Persistence API (JPA).
It outlines the problem scenario when persisting a parent entity that contains a collection of child entities, developers often need to explicitly save each child entity before persisting the parent. This manual process can be cumbersome and error-prone, especially for complex object graphs.
🚀 DSA for the Cracking the Coding Interview. Animated Examples for Faster Learning and Deeper Understanding. 🚀
Java Data Structures & Algorithms + LEETCODE Exercises
Bestseller | Rating: 4.7 ⭐/5 (5k+ ratings) | 36k+ students