akka / akka-persistence-r2dbc

https://doc.akka.io/libraries/akka-persistence-r2dbc/current/
Other
24 stars 17 forks source link

[Feature Request] Cloud Spanner support #387

Open cwardgar opened 1 year ago

cwardgar commented 1 year ago

Spanner is a distributed SQL database with an R2DBC Driver. It even has a PostgreSQL interface. Unfortunately, akka-persistence-r2dbc cannot be used in combination with those two technologies because it binds parameters to SQL statements via index, but cloud-spanner-r2dbc only supports binding parameters via name. It would be great if akka-persistence-r2dbc supported Spanner, preferably its GoogleSQL interface (reason being that the PostgreSQL interface can only be selected at database creation time).

How much work would that be? If I'm not mistaken, cloud-spanner-r2dbc was partially derived from the now-defunct akka-persistence-spanner. (What happened to that project, btw? Why was its GitHub repo deleted?) Would that fact ease the addition of Spanner support to this plugin? Does Spanner's TrueTime commit timestamps allow for a simpler implementation than what you've done for Postgres and Yugabyte?

I took a shot at forking this repo and adding the support myself, but found it to not be very extensible--I'd have had to modify a lot of code in private classes/methods. Perhaps a compromise here is for you to improve extensibility, so that users could add support for new DBs more easily?

patriknw commented 1 year ago

Lightbend might add support for other database backends when there is customer demand for it. Committing to maintenance for more databases is a major undertaking but we are happy to discuss it with our customers. Please reach out to patrik.nordwall at lightbend dot com if you would like to talk more about it.