Java stack - ORM and database scalability

We are currently working on a web project design, and for this we need to use the java stack.

To begin with, we could use a single database (PostgreSQL in our case), given the limited load. In this case, ORM, like Hibernate, will be a good solution, because we know that the problem of object-relational relations is always one of the most costly and costly, this is the reason to use ORM tools - cheap, saves a lot of time.

But the problem with this is that we are expecting sharding and master / slave (read / write) replication in the database layer, which is a real problem for ORM (at least as far as I know).

Please correct me if I am wrong, and there is a good ORM tool for the Java stack that we could use.

I know that there is a project called Hibernate Shards that could solve the problem, but it never transmitted a beta version, and its development stopped during the year 2007, according to the link.

Using regular Hibernate with a distributed level 2 cache, we could use the number of nodes

with business logic, but this will not solve the problem with the scalability of the database, and we could use only one database for the application.

Bottom line: is there an ORMS for open source / free suitable for our case (java stack), or should we implement it ourselves, even at a significant cost, in order to subsequently provide database scalability and, possibly, other advantages.

Thanks!

+6
source share
2 answers

I have to add a good word for Java data objects and especially for implementation at http://www.datanucleus.org. Especially if you use annotations and a typical query language, it’s very easy to get speed and do really interesting things very quickly.

In addition, JDO is a database agnostic, so if you decide you prefer to use something other than a relational database, the conversion will be relatively simple. Since the JDBC driver is used to connect to the database, the clustering / scaling solutions that are attached at this level should be relatively transparent. (This is a complete wishful thinking on my part - I do not know that this is true, but it should be, right?)

I gave Hibernate two or three days and a big book and decided that I repeat myself too often and limit myself to RDB systems. Look and see what you think.

0
source

One solution worth considering is to buy a horizontal scalability solution that will take care of all these issues for you.

There are several solutions that allow you to scale horizontally without changes to your application (changes that will be required using methods such as sharding).

-1
source

Source: https://habr.com/ru/post/949411/


All Articles