Skip to content
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

[Architecture] Switch over to a common impl with separate drivers #433

Merged
merged 12 commits into from
Jan 8, 2025

Conversation

mhutchinson
Copy link
Contributor

@mhutchinson mhutchinson commented Jan 6, 2025

The functionality is the same, but now all personalities have a common wrapper around a driver instead of having separate implementations directly in their hand.

The big advantage of the main API being this shape is that Tessera now "feels" like a single API, with drivers to bind it to different environments. This is more similar to canonical usage of sql/db package, which many go developers are familiar with.

Another advantage realized in this change is that deduplication is now folded into the core Appender object, instead of functionally floating around alongside it and needing to be handled by the personalities.

@mhutchinson mhutchinson requested a review from AlCutter January 6, 2025 13:10
@mhutchinson
Copy link
Contributor Author

Raised this as a draft to allow conversation to first happen about the high level approach before we get into the nuts and bolts of this change.

@mhutchinson mhutchinson force-pushed the babyDriver branch 2 times, most recently from fc2700d to 8c121ce Compare January 6, 2025 17:09
The functionality is the same, but now all personalities have a common wrapper around a driver instead of having separate implementations directly in their hand.

This is a bit more convoluted than seems necessary, but the layers of
indirection allow us to properly hide the implementation methods because
they're only available via a class that is internal.

The big advantage of the main API being this shape is that Tessera now
"feels" like a single API, with drivers to bind it to different
environments. This is more similar to canonical usage of sql/db package,
which many go developers are familiar with.

Another advantage realized in this change is that deduplication is now
folded into the core Appender object, instead of functionally floating
around alongside it and needing to be handled by the personalities.
Unclear why this happens only when I use a go workspace, but there's some underlying problem here. googleapis/google-cloud-go#11283
@mhutchinson mhutchinson marked this pull request as ready for review January 8, 2025 12:58
@mhutchinson mhutchinson merged commit 2edef58 into transparency-dev:main Jan 8, 2025
16 checks passed
@mhutchinson mhutchinson deleted the babyDriver branch January 8, 2025 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants