-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Spring Data YugabyteDB (SDYB): Tracking Issue #7956
Comments
Following tasks, are considered in the first iteration of the Spring Data YugabyteDB project Spring Data YugabyteDB YSQL Implementation detailsTask 1: Adding YugabyteDB Dialect ✅Task 2: Adding YugabyteDB Specific Configuration ✅
Task 3: Adding YugabyteDB Template API using YugabyteDB datasource ✅Task 4: YugabyteDB Specific entity mapping. Extend @id entity annotation to support. [Spring Data JDBC doesn’t support schema generation so not sure if this is required.] ⬜️
Option 1: Add properties to existing @id annotation to support above partitioning strategies Option 2: Add new annotation for Partitioning which works along with @id annotation
Task 5: YugabyteDB datatype support ⬜️
Task 6: YugabyteDB Repositories ✅
|
Spring Data YugabyteDB Project Structure
|
Spring Data YugabyteDB - YSQLCompleted Features
Spring Boot Data YugabyteDB [in-progress]
|
nchandrappa
changed the title
Spring Data YugabyteDB (SDYB) Design Details
Spring Data YugabyteDB (SDYB): Tracking Issue
Jul 15, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Motivation
Spring Data modules are one of the widely used Java frameworks for accessing the databases. Spring data provides consistent and familiar APIs for querying the data by supporting Data repository, template methods. For app developers these common set of APIs provided by Spring Data abstracts away the need to learn the database-specific query language, reducing the learning curve required for working with a database.
Spring Data YugabyteDB modules intend to bring support for YugabyteDB YSQL and YCQL API for building modern cloud native applications. For application developers, Spring Data YugabyteDB will bridge the gap for learning the distributed SQL concepts with familiarity and ease of Spring Data APIs.
Goals
YSQL
a. HASH/ASC/DESC options for pkey/index (@id) (non-blocker if not programmatically supported)
b. SPLIT INTO/AT (non-blocker if not programmatically supported)
c. Maybe a uuid/timeuuid/JSON version for @generated key columns
d. Read/write Isolation
e. Read - follower reads
f. Use YugabyteDB JDBC clusteraware driver
spring.data.yugabytedb.ysql.*
YCQL
a. @enableYugabyteDBYcqlRepositories
b. JSONB data type support for YCQL. Native data type supported in YugabyteDB
c. YugabyteDB YCQL Driver support for PartitionAwarePolicy for One hop fetch
d. Transactional support in YugabyteDB YCQL repository
e. Prepared statement support for YCQL repository
spring.data.yugabytedb.ycql.*
Spring Data YugabyteDB
Spring Data YugabyteDB (SDYB) is a top-level project which provides support for both YCQL and YSQL APIs. SDYB will have two projects,
Spring Data YugabyteDB will have the parent project BOM which will include both these dependencies.
Requirements of Spring Data Projects
Spring Data projects should support following database specific configurations,
@enableyugabyteycqlrepositories
and@enabletransactionsupport
annotationSpring Data YSQL
Spring Data JDBC module provides JDBC template and JDBC repository implementation for relational databases with JDBC access. Spring Data JDBC is not an JPA compliant ORM provider, it's a very lightweight implementation provided by Spring team.
YugabyteDB YSQL Dependency
Design
Implement a YugabyteDB YSQL dialect to support YSQL specific features
a. YB specific annotations for entity mapping and field mapping
- Primary key (Hash/Range)
- Compound keys
- Data types support
Provide YugabytedbTemplate and YugabytedbRepository implementation
a. Transaction support
b. Follower Reads support
c. Index Support
Implement
@enableyugabyteysqlrepositories
annotationSpring Data YCQL
YugabyteDB YCQL API is Cassandra CQL compliant API, YCQL is fully compatible with Spring Data Cassandra project with YugabyteDB YCQL Java driver. However, YugabyteDB has support for additional features which require enhancement to Spring Data projects. Here is the list of enhancements,
YugabyteDB YCQL Dependency
Design
Example:
Provide YugabytedbYCQLTemplate and YugabytedbYCQLRepository implementation
a. Transaction support
b. Index support
Implement
@enableyugabyteycqlrepositories
and@enabletransactionsupport
annotationThe text was updated successfully, but these errors were encountered: