Skip to content

FINERACT-1576 GCP Cloud SQL Support#2285

Closed
IOhacker wants to merge 1 commit intoapache:developfrom
IOhacker:FINERACT-1576
Closed

FINERACT-1576 GCP Cloud SQL Support#2285
IOhacker wants to merge 1 commit intoapache:developfrom
IOhacker:FINERACT-1576

Conversation

@IOhacker
Copy link
Contributor

Description

GCP Cloud SQL Support has advantage for using a fully managed SQL environment, Cloud SQL on GCP supports MySQL & Postgresql. The Cloud SQL Connector for Java is a library that provides IAM-based authorization and encryption when connecting to a Cloud SQL instance. It can not provide a network path to a Cloud SQL instance if one is not already present. It is Apache licensed too. https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory

Checklist

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Write the commit message as per https://github.com/apache/fineract/#pull-requests

  • Acknowledge that we will not review PRs that are not passing the build ("green") - it is your responsibility to get a proposed PR to pass the build, not primarily the project's maintainers.

  • Create/update unit or integration tests for verifying the changes made.

  • Follow coding conventions at https://cwiki.apache.org/confluence/display/FINERACT/Coding+Conventions.

  • Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/api-docs/apiLive.htm with details of any API changes

  • Submission is not a "code dump". (Large changes can be made "in repository" via a branch. Ask on the developer mailing list for guidance, if required.)

FYI our guidelines for code reviews are at https://cwiki.apache.org/confluence/display/FINERACT/Code+Review+Guide.

@galovics galovics requested review from galovics and vidakovic April 21, 2022 08:21
@galovics
Copy link
Contributor

Even though the changes will work I have some concerns about introducing them this way.

This is probably the first step where we want to add support for a native cloud database and since IAM authentication is used, the database URL will be different than in regular cases.
Architecturally speaking, I'd envision a number of resolvers chained together. Each resolver can decide in which environment it's running in and create the appropriate datasource with all the configurations necessary.
For example we could have the currently supported regular datasource in a DefaultDataSourceResolver or something. And then there's a GcpDataSourceResolver. All these resolvers are in priority order, namely the DefaultDataSourceResolver is the last one to be invoked.
The first resolver "taking" the invocation and creating the appropriate datasource will stop the chain from continuing.

That way, we can very well decouple specifics to certain environments to separate classes without polluting existing classes with a lot of if statements.
What do you think?

cc @vidakovic

@IOhacker
Copy link
Contributor Author

IOhacker commented Apr 21, 2022 via email

@github-actions
Copy link

This pull request seems to be stale. Are you still planning to work on it? We will automatically close it in 30 days.

@github-actions github-actions bot added the stale label May 22, 2022
@galovics
Copy link
Contributor

Closing as it's obsolete. Please reopen if you're planning to work on it.

@galovics galovics closed this Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants