Intermediate user level
Understand the newest trend in database programming for developers working in Java, Kotlin, Clojure, and other JVM-based languages. This book introduces Reactive Relational Database Connectivity (R2DBC), a modern way of connecting to and querying relational databases from Java and other JVM languages. The book begins by helping you understand not only what reactive programming is, but why it is necessary. Then building on those fundamentals, the book takes you into the world of databases and the newly released Reactive Relational Database Connectivity (R2DBC) specification.
Examples in the book are worked using the freely available MariaDB database along with MariaDB\'s vendor-implementation of the R2DBC service-provider interface (SPI). Following along with the examples and the provided example code helps prepare you to work with any of the growing number of R2DBC implementations for popular enterprise databases such as Oracle Database and SQL Server. You\'ll be well prepared for what is becoming the future of database access from Java and other languages built on the JVM.
What You Will LearnUnderstand why R2DBC was created and how it utilizes the Reactive Streams API Understand the components of the R2DBC service-provider interfaceCreate and manage reactive database connections and connection pools using an R2DBC clientProgrammatically execute queries on a relational database using an R2DBC clientEffectively utilize transactions using an R2DBC clientBuild relational database-driven applications that are event-driven and non-blocking
Who This Book Is For
Software developers building solutions using JVM languages and the JVM ecosystem, and developers who need an introduction to the R2DBC specification and reactive programming with relational databases and want to understand what Reactive Relational Database Connectivity is and why it came about. This book includes practical examples of using the R2DBC specification with Java and MariaDB that will provide developers with the knowledge they need to create their own solutions.
Part I. The Reactive Movement and R2DBC1. The Case for Reactive Programming2. Introduction to R2DBC
Part II. The R2DBC Service-Provider Interface3. The Path to Implementation4. Connections5. Transactions6. Statements7. Handling Results8. Result Metadata9. Mapping Data Types10. Handling Exceptions
Part III. Getting Started with R2DBC and MariaDB11. Getting Stated with R2DBC12. Managing Connections13. Managing Data14. Managing Transactions15. Connection Pooling16. Practical Applications with Spring Data and R2DBC