Announcing Spring Data YugabyteDB
YugabyteDB is the database of choice for building stateful cloud native apps that require resilience and scale. YugabyteDB offers Spring developers an easy way to deploy a transactional, resilient and geo-distributed database in their application stack from the outset, while also providing flexibility and scalability as requirements change. The Spring community has always been a major influence on what we build at Yugabyte. Many of our customers rely on the immensely popular Spring Boot framework to build microservices.
Today our commitment to the Spring community is reinforced by our announcement of the Spring Data YugabyteDB project in collaboration with the Spring Data project team. Spring Data YugabyteDB enables Spring developers to easily use YugabyteDB distributed SQL databases for Spring-based microservice applications, combining the familiar Spring Repository interface with the resilience, scalability, and geo-distribution offered by YugabyteDB. As with the database itself, Spring Data YugabyteDB is available as 100% open source software.Yugabyte is a Gold sponsor at the SpringOne conference this year. The event is free to register and you can catch us in our Slack Channel at #SpringOne.
Using Spring Data YugabyteDB, developers can access a YugabyteDB cluster through a standard set of APIs provided by Spring Data. This does away with the need to learn the database-specific query language, reducing ramp-up time and increasing developer velocity while giving the experienced developer the ability to harness the full power of a distributed database.
Before Spring Data YugabyteDB, developers could use Spring Data JPA to access YugabyteDB clusters with no code changes. However, Spring Data YugabyteDB for YSQL offers several advantages over Spring Data JPA by supporting concepts specific to distributed SQL within the context of Spring Data APIs and Annotations. It uses the recently introduced Yugabyte Smart Client Driver for SQL that is optimized for use with a distributed SQL database. The Yugabyte Smart Driver for SQL is both cluster-aware and topology-aware. The driver keeps track of the members of the cluster as well as their locations. As nodes are added or removed from clusters, the driver updates its membership and topology information.
The Yugabyte Smart Driver for SQL offers several advantages over a PostgreSQL driver:
- Simplify operations by eliminating the load balancer: Yugabyte’s new driver eliminates the need for an external load balancer to route requests from clients to different nodes in a database cluster.
- Improve performance by connecting to nearby nodes: Client applications can identify and connect to the database cluster nodes closest to them to achieve lower latency.
- Improve availability with better failure handling: If a database node becomes unreachable due to a network issue or server failure, clients can connect to a different node in the cluster. Retry logic on the client-side can make failures transparent to the end-user.
Even back in May 2018 when we announced the general availability of YugabyteDB 1.0 we talked about the need to build wire-protocol compatible server-side implementations of Cassandra and Postgres to allow for developer agility and the ability for developers to leverage existing ecosystems for these APIs, first and foremost the Spring application framework. Since then, improving and expanding our support for Spring developers has featured in nearly every release of YugabyteDB, and for good reason. Spring Boot remains the dominant Java framework.
Our long time partnership with VMware (starting with Pivotal Software) continues to grow and is fueled by our joint enthusiasm for the types of outcomes Developers can achieve by leveraging the Spring Data YugabyteDB project.
We invite you to start exploring how you can use YugabyteDB for your Spring applications. Here are a few useful resources:
- The YugabyteDB for Spring page on our website provides more information about why YugabyteDB is a great fit for building Spring-based microservices.
- We offer free instructor-led workshops that go over building cloud native apps using Spring Boot and deploying them in Kubernetes environments with YugabyteDB databases in Yugabyte Cloud. Register for an upcoming Builder Series Workshop. All you need is a free Yugabyte Cloud account (takes 3 minutes to sign up).
- Check out our self-explaining PetClinic sample app. This repo is a branch of the official Spring PetClinic application with domain & persistence layer built with Spring Data YugabyteDB YSQL instead of Spring Data JPA.
- In a subsequent blog post, we will get into the details of developing apps with Spring Data YugabyteDB.
- Join our community Slack channel for active discussions on YugabyteDB and Spring development.