Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Replicated" data sources. #110

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

"Replicated" data sources. #110

wants to merge 6 commits into from

Conversation

gm2552
Copy link
Contributor

@gm2552 gm2552 commented Feb 28, 2024

A replicated datasource is a single logical datasource that is comprised of two endpoints:

  • A read/write endpoint
  • A read only endpoint

The data source is presented as a single binding and maps to the following spring properties:

JDBC:

spring.datasource.replicated.rw.*
spring.datasource.replicated.ro.*

R2DBC:

spring.r2dbc.replicated.rw.*
spring.r2dbc.replicated.ro.*

where * maps to DataSourceProperties and R2dbcProperties respectively.

This PR creates a BindingsPropertiesProcessor for all of the currently supported databases using the following naming convention: <Database>ReplicatedBindingsPropertiesProcessor

meyerg added 4 commits February 23, 2024 10:38
Going with a single secret design as well as only supporting a single
logical "replicated" connection.
Created an abstract class for most replicated database processors as
there is a common pattern between these processors.

Added unit tests for new replicated binding processors.
Also updated Java doc and tagged all new processors as "final"
Copy link
Collaborator

@anthonydahanne anthonydahanne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add license headers to all the new source files, making sure to make it start with:

Copyright 2024 the original author or authors.

Thanks!

@gm2552 gm2552 changed the title WIP: "Replicated" data sources. "Replicated" data sources. Feb 29, 2024
@cppforlife
Copy link

@gm2552 do we have an example usage of how this "feels" to be consumed by the app?

@gm2552
Copy link
Contributor Author

gm2552 commented Feb 29, 2024

@gm2552 do we have an example usage of how this "feels" to be consumed by the app?

@cppforlife Yes, there is an internal document that outlines how an app would use this with and without auto configuration. I sent you a link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants