Book Image

Persistence Best Practices for Java Applications

By : Otavio Santana, Karina Varela
Book Image

Persistence Best Practices for Java Applications

By: Otavio Santana, Karina Varela

Overview of this book

Having a solid software architecture breathes life into tech solutions. In the early stages of an application’s development, critical decisions need to be made, such as whether to go for microservices, a monolithic architecture, the event-driven approach, or containerization. In Java contexts, frameworks and runtimes also need to be defi ned. But one aspect is often overlooked – the persistence layer – which plays a vital role similar to that of data stores in modern cloud-native solutions. To optimize applications and data stores, a holistic understanding of best practices, technologies, and existing approaches is crucial. This book presents well-established patterns and standards that can be used in Java solutions, with valuable insights into the pros and cons of trending technologies and frameworks used in cloud-native microservices, alongside good Java coding practices. As you progress, you’ll confront the challenges of cloud adoption head-on, particularly those tied to the growing need for cost reduction through stack modernization. Within these pages, you’ll discover application modernization strategies and learn how enterprise data integration patterns and event-driven architectures enable smooth modernization processes with low-to-zero impact on the existing legacy stack.
Table of Contents (18 chapters)
1
Part 1: Persistence in Cloud Computing – Storing and Managing Data in Modern Software Architecture
6
Part 2: Jakarta EE, MicroProfile, Modern Persistence Technologies, and Their Trade-Offs
9
Chapter 7: The Missing Guide for jOOQ Adoption
11
Part 3: Architectural Perspective over Persistence

The History of Data Storage – From the Caves to the Cloud

Data: a critical, life-changing, and fundamental asset that supports humanity’s existence and evolution. For thousands of years (yes, thousands!), data storage solutions have evolved and supported humans by allowing us to “remember” and share knowledge in easy, maintainable, and searchable manners. Data turns into information, which in turn turns into knowledge. The ability to learn from the past and plan for the future is highly influenced by how we manage data in our systems today.

Software engineers are the catalysts of this process: our responsibility is to define and deliver solutions to people’s problems through software engineering – solutions that mostly revolve around data manipulation at a large or small scale. Having understood the importance of persistence in software engineering, you’re ready to bring your solutions’ persistence to the next level.

In this chapter, we will explore the modern era, where databases have become the backbone of our applications and the entire planet. We will cover the following topics:

  • Why do databases exist? The history of databases
  • Characteristics of Java persistence frameworks
  • The cloud’s effect on stateful solutions
  • Exploring the trade-offs of distributed database systems – a look into the CAP theorem and beyond

This first chapter provides you with an understanding of the past and current states of data storage technologies, before moving on to more advanced topics. This will give you a better foundation to work from. You will learn how data storage technologies responded to the market’s cloud-shift mentality. Finally, you will become familiar with practices such as Domain-Driven Design (DDD), which perfectly ties in with good persistence development practices, and the challenges faced by distributed data systems that await us in a distributed world, such as the CAP theorem.