My Account Log in

1 option

R2dbc revealed : reactive relational database connectivity for java and jvm programmers / Robert Hedgpeth.

O'Reilly Online Learning: Academic/Public Library Edition Available online

View online
Format:
Book
Author/Creator:
Hedgpeth, Robert, author.
Language:
English
Subjects (All):
Relational databases.
Physical Description:
1 online resource (220 pages) : illustrations
Place of Publication:
[Place of publication not identified] : Apress L. P., [2021]
Summary:
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 Learn * Understand why R2DBC was created and how it utilizes the Reactive Streams API * Understand the components of the R2DBC service-provider interface * Create and manage reactive database connections and connection pools using an R2DBC client * Programmatically execute queries on a relational database using an R2DBC client * Effectively utilize transactions using an R2DBC client * Build 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.
Contents:
Intro
Table of Contents
About the Author
About the Technical Reviewer
Acknowledgments
The World at Scale
Introduction
Part I: The Reactive Movement and R2DBC
Chapter 1: The Case for Reactive Programming
A Traditional Approach
Imperative vs. Declarative Programming
Thinking Reactively
The Reactive Manifesto
Reactive Systems
Reactive Systems != Reactive Programming
Asynchronous Data Streams
Data Streams
Back Pressure
Summary
Chapter 2: Introduction to R2DBC
What Is R2DBC?
A New Approach
Beyond JDBC
R2DBC Implementations
Embracing Reactive Programming
Enabling Vendor Creativity
Enforcing Compliance
Reactive Streams
Another Specification
API Fundamentals
Processors
JVM Interfaces
Implementations
Part II: The R2DBC Service-Provider Interface
Chapter 3: The Path to Implementation
The Database Landscape
Power in Simplicity
R2DBC Compliance
Guiding Principles
Specification Implementation Requirements
Specification Extensions
Wrapped Interfaces
Closeable Interfaces
Testing and Validation
Chapter 4: Connections
Establishing Connections
The Anatomy
R2DBC Hindsight
Connection Factory
Driver Implementations
Exposing Metadata
ConnectionFactories
Discovery
Bringing It All Together
Connections
Obtaining Connections
Acquiring Metadata
Validating Connections
Closing Connections
Chapter 5: Transactions
Transaction Fundamentals
The Need for Transactions
ACID Compliance
Methods of Control
Committing Transactions
Rolling Back Transactions
Savepoints
R2DBC Transaction Management
Auto-commit Mode
Explicit Transactions
Managing Savepoints
Releasing Savepoints.
Isolation Levels
Managing Isolation
Performance Considerations
Chapter 6: Statements
SQL Statements
R2DBC Statements
The Basics
Creating Statements
Running Statements
Sneak Peek
Dynamic Input
Creating Parameterized Statements
Binding Parameters
Batching Statements
Using Null Values
Auto-generated Values
Performance Hints
Chapter 7: Handling Results
The Fundamentals
Consuming Results
Cursors
Update Count
Rows and Columns
Row Anatomy
Retrieving Values
Generic Objects
Specifying Types
Multiple Columns
Chapter 8: Result Metadata
Data About Data
Row Metadata
Column Metadata
Required Methods
Optional Methods
getJavaType
getNativeTypeMetadata
getNullability
getPrecision
getScale
Retrieving Metadata
Obtaining a RowMetadata Object
Accessing ColumnMetadata
Chapter 9: Mapping Data Types
Data Type Differences
Mapping Simple Data Types
Character Types
Boolean Types
Binary Types
Numeric Types
DateTime Types
Collection Types
Mapping Advanced Data Types
BLOBs and CLOBs
Creating Objects
Retrieving Objects
Consuming Objects
Releasing Objects
Chapter 10: Handling Exceptions
General Exceptions
IllegalArgumentException
IllegalStateException
UnsupportedOperationException
R2DBCException
Categorized Exceptions
Non-transient Exceptions
Transient Exceptions
Part III: Getting Started with R2DBC and MariaDB
Chapter 11: Getting Started with R2DBC
Database Drivers
Outline Placeholder
R2DBC Client Libraries
Creating a Client
Use an Existing Client Library
Looking Ahead
MariaDB and R2DBC
Introduction to MariaDB
Download and Install
Direct Download
Docker Hub Download
Using R2DBC.
Requirements
Install the Java Development Kit
Install Apache Maven
Apache Maven Basics
Create a New Project
Add Dependencies
Build the Project
Show Me the Code
Chapter 12: Managing Connections
Configuration
Database Connectivity
Driver Implementation and Extensibility
Running Reactive Code
Obtaining MariadbConnectionFactory
Creating a New Connection Factory
MariadbConnectionConfiguration
ConnectionFactory Discovery
Creating a Connection
Validating and Closing Connections
Putting It All Together
Metadata
Chapter 13: Managing Data
MariadbStatement
Statement Hierarchy
Dependency Disclaimer
Obtaining a Publisher
Subscribing to Execution
Retrieving Results
Row Update Count
Mapping Results
Working with Row Objects
Handling Metadata
Generated Values
Multiple Statements
Using MariadbBatch
Using MariadbStatement
Parameterized Statements
Reactive Control
Blocking Execution
Managing Back Pressure
Chapter 14: Managing Transactions
Database Transaction Support
Database Preparation
Transaction Basics
Auto-committing
Committing a Transaction
Rolling Back a Transaction
An Imperative Perspective
Using Savepoints
Releasing Savepoints
Handling Isolation Levels
Chapter 15: Connection Pooling
Connection Pool Fundamentals
Benefits of Connection Pooling
How to Get Started
Roll Your Own Connection Pool
Introducing R2DBC Pool
R2DBC Pool
Adding a New Dependency
Connection Pool Configuration.
Connection Factory Discovery
ConnectionPoolConfiguration
Creating a ConnectionPool
Managing Connections
Obtaining a Connection
Releasing a Connection
Cleaning Up
Chapter 16: Practical Applications with Spring Data and R2DBC
Introduction to Spring
Spring Boot
Spring Data
Spring Data R2DBC
Project Reactor
Getting Started
Spring Initializr
Project Configuration
Adding Dependencies
Generate a New Project
Configuring Connections
Spring Data Repositories
Mapping Entities
Creating a New Repository
Querying Data
Using Custom Queries
Parameterization
Testing It Out
Build and Run the Project
Call an Endpoint
Index.
Notes:
Description based on print version record.
Includes index.
ISBN:
9781484269893
1484269896
OCLC:
1244806223

The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.

Find

Home Release notes

My Account

Shelf Request an item Bookmarks Fines and fees Settings

Guides

Using the Find catalog Using Articles+ Using your account