Repository navigation
Add article: A Modern Java Developer's Guide for Google Cloud Databases #448
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| --- | ||
| title: "Alexis Moussine-Pouchkine" | ||
| avatar: "alexis-moussine-pouchkine.jpg" | ||
| avatarFull: "alexis-moussine-pouchkine-full.jpg" | ||
| bio: "Alexis Moussine-Pouchkine was a long-time Java advocate at Sun Microsystems and is now a Developer Advocate at Google Cloud in EMEA." | ||
| description: "Developer Advocate at Google Cloud in EMEA and former Java advocate at Sun Microsystems." | ||
| linkedin: "https://www.linkedin.com/in/alexismp/" | ||
| github: "https://github.com/alexismp" | ||
| --- |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| --- | ||
| title: "A Modern Java Developer's Guide for Google Cloud Databases" | ||
| date: "2026-01-01" | ||
| description: "A practical guide for modern Java developers working with Google Cloud databases: AlloyDB, Cloud SQL, Spanner, and Firestore." | ||
| authors: | ||
| - "alexis-moussine-pouchkine" | ||
| image: "part1.jpg" | ||
| categories: | ||
| - "Java" | ||
| - "Cloud" | ||
| - "Databases" | ||
| related_posts: [] | ||
| canonical: "https://medium.com/google-cloud/a-modern-java-developers-guide-for-google-cloud-databases-22e6c8b2f8d3" | ||
| --- | ||
|
|
||
| As a Java developer I’ve learned to rely on JDBC, on the efficiency of connection pools, and on my favorite ORM or frameworks (Spring, Quarkus, or Micronaut). These are stable, predictable technologies that I can count on for building enterprise apps. | ||
|
|
||
| This short intro and upcoming detailed posts are meant to serve as a guide for **Java developers in their Google Cloud Database journey**, including when moving from conventional on-premises databases to a cloud-native approach. We’ll cover configuration, security, performance, monitoring, and overall developer experience. | ||
|
|
||
|  | ||
|
|
||
| ## Google Cloud Databases for Java Developers | ||
|
|
||
| No need to abandon your stack to use Google Cloud databases: all of them plug right into standard JDBC, HikariCP, and your favorite frameworks. Whether you’re relying on the AlloyDB Java Connector for automated mTLS or designing schemas for globally distributed Spanner, this series will help you pick and configure the right tool for your workload. | ||
|
|
||
| **AlloyDB** gives you full PostgreSQL wire compatibility backed by a Google-engineered storage layer and a 99.99% SLA (including maintenance) for demanding transactional and AI workloads. Java developers typically use the AlloyDB Java Connector with standard JDBC and HikariCP. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Qualify the AlloyDB SLA. The 99.99% SLA applies to HA instances, not every AlloyDB configuration. Google's current SLA specifies 99.95% for HA instances in Stockholm. Qualify both statements so readers do not assume the higher SLA for those deployments. (cloud.google.com) Also applies to: 40-40
|
||
|
|
||
| **Cloud SQL** removes operational toil when running MySQL, PostgreSQL, and SQL Server databases with read pools, data caching, and near-zero downtime maintenance. Connecting from Java is done using the Cloud SQL Java Connector or using Auth Proxy alongside standard JDBC and Spring Boot. | ||
|
|
||
| **Spanner** is a globally distributed database that pairs horizontal scalability, strong consistency, and a 99.999% SLA with multi-model support: relational, graph, vector, and key-value. You can wire it into Java applications using either the Spanner JDBC Driver, the native Java Client Library, Spring Data Spanner, or PGAdapter with JPA. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Qualify the Spanner SLA. A regional Spanner instance has a lower SLA than 99.999%. The higher figure applies to dual-region and multi-region instances. Say “up to 99.999%” here, as the matrix does, and identify the required configuration. (cloud.google.com)
|
||
|
|
||
| **Firestore** is a serverless NoSQL document database offering a Native and a MongoDB-compatible mode. It was designed for schema flexibility, real-time sync, automatic scaling, and up to a 5 nine SLA. Java devs will typically use the Firestore Java Client Library, Spring Cloud GCP, or even the standard MongoDB Java Driver. | ||
|
|
||
| ## Summary Matrix for Java Developers and Architects | ||
|
|
||
| Here’s a [tabular presentation](https://gist.github.com/alexismp/2976cf53d946a6bc2175957d4a430de2) summarizing all of this knowledge for Java developers and architects: | ||
|
|
||
| | Google Cloud Database Service | Data Model | Key Strengths | Primary Java Integration Method | | ||
| | :--- | :--- | :--- | :--- | | ||
| | [**AlloyDB**](https://cloud.google.com/products/alloydb) | PostgreSQL-compatible **Relational** | AI-ready (e.g. Vector search w/ ScaNN index, SQL AI functions), high-performance HTAP (Columnar Engine), Managed Connection Pooling, 99.99% SLA | AlloyDB Java Connector, HikariCP / JDBC, Spring Boot (plus Quarkus & Micronaut) | | ||
| | [**Cloud SQL**](https://cloud.google.com/sql) | MySQL, PostgreSQL, SQL Server **Relational** | Managed version of popular databases, operational simplicity, Enterprise & Enterprise Plus editions (Data Cache, Read Pools, near-zero downtime maintenance) | Cloud SQL Java Connector, Cloud SQL Auth Proxy (with JDBC), Spring Boot | | ||
| | [**Spanner**](https://cloud.google.com/spanner) | Globally Distributed **Relational** *(+ Multi-Model: Graph, Vector, KV)* | Global scale with strong consistency, horizontal scalability, up to 99.999% (5 9s) SLA availability, GoogleSQL & PostgreSQL dialects, Serializable & Repeatable Read isolation | Spanner JDBC Driver, Native Java Client Library, Spring Data Spanner *(also supports PGAdapter / JPA)* | | ||
| | [**Firestore**](https://cloud.google.com/products/firestore) | **NoSQL** Document *(Native & MongoDB-compatible)* | Schema flexibility, real-time updates, automatic scaling, serverless, Standard & Enterprise editions (up to 99.999% SLA, Pipeline queries) | Firestore Java Client Library, Spring Cloud GCP *(plus MongoDB Java Driver in Mongo-compatible mode)* | | ||
|
|
||
| ## What's Next in This Series | ||
|
|
||
| Upcoming Java-focused blogs here will cover: | ||
|
|
||
| * **AlloyDB for PostgreSQL** (including [AlloyDB Omni](https://cloud.google.com/alloydb/omni) for local and edge use-cases, and [AlloyDB Express](https://cloud.google.com/blog/products/databases/introducing-alloydb-express-for-rapid-testing-and-prototyping) for rapid testing and prototyping) | ||
| * **Cloud SQL** (focusing on **MySQL** though the same connector patterns apply to PostgreSQL and SQL Server) | ||
| * **Spanner** and **Firestore** (focusing on their native Google Cloud APIs). | ||
|
|
||
|  | ||
|
|
||
| We’ll use **Spring Boot** as the primary framework but also show how these building blocks apply to **Quarkus and Micronaut** developers. | ||
|
|
||
| **AlloyDB AI** and the **MCP Toolbox for Databases** (featuring the newly released [**MCP Toolbox Java SDK v1.0**](https://github.com/googleapis/mcp-toolbox-sdk-java)) are also on the menu, all from a Java developer’s perspective. Onwards! | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exclude Firestore from the JDBC claim.
Firestore uses its native Java client or the MongoDB driver for its MongoDB-compatible mode. It does not plug into the existing JDBC and HikariCP stack as claimed here. Qualify this sentence so readers do not plan a Firestore integration around that stack. (docs.cloud.google.com)