Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Database sharding and JPA

I am working on a Java application that requires horizontal partitioning of data in different PostgreSQL servers. I would like to use a JPA framework and Spring for transaction management.

The most popular frameworks for sharding data with JPA seem to be Hibernate Shards, which appears to be no longer in development, and OpenJPA Slice, which does not support virtual shards (one of my requirements). Are there any other options that I'm missing, or a way to get around the OpenJPA limitation?

Thanks in advance for your input!

like image 944
is-serp Avatar asked Dec 02 '12 17:12

is-serp


1 Answers

You can have a look at Sharding-JDBC, it is a JDBC driver for shard databases and tables, can adapter for any ORM frameworks.

like image 136
Liang Zhang Avatar answered Sep 30 '22 08:09

Liang Zhang