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

Implement IDataStore #2704

Closed
clement911 opened this issue Mar 18, 2024 · 6 comments · Fixed by #2705
Closed

Implement IDataStore #2704

clement911 opened this issue Mar 18, 2024 · 6 comments · Fixed by #2705
Assignees
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: docs Improvement to the documentation for an API.

Comments

@clement911
Copy link

clement911 commented Mar 18, 2024

I was surprised to find little guidance on how to implement a custom IDataStore.

StoreAsync<T>(string key, T value)

How can we store a T if we don't know what it represents?
We don't even know if it's serializable, and if it is, which serialization is supported (Json.NET vs System.Text.Json)?
Is JSON serialization future proof if the shape of T changes?

@clement911 clement911 added priority: p3 Desirable enhancement or fix. May not be included in next release. type: question Request for information or clarification. Not an issue. labels Mar 18, 2024
@amanda-tarafa
Copy link
Contributor

There are a few things in these libraries, that if we were to start over, we'd do differently. And IDataStore is likely one of those. At the moment we need to keep it as is for backwards compatibility reasons. That's not to say you are wrong, you are absolutely right that this is poorly documented.

I'll be sending a PR shortly to document how IDataStore should be implemented based on Google.Apis usage of it. And that should be semver future proof, which means, we may only change the interface itself or the expected behaviour as a breaking change in a new major version.

@amanda-tarafa amanda-tarafa added type: docs Improvement to the documentation for an API. and removed type: question Request for information or clarification. Not an issue. labels Mar 19, 2024
amanda-tarafa added a commit that referenced this issue Mar 19, 2024
The documentation now reflects the usage of IDataStore by Google.Apis library.

Closes #2704
amanda-tarafa added a commit that referenced this issue Mar 19, 2024
The documentation now reflects the usage of IDataStore by Google.Apis library.

Closes #2704
@clement911
Copy link
Author

I see. Thanks for the quick reply 👍

That being said, please consider introducing a new interface that is more intuitive, in a way that new users can use it, while making sure that IDataStore continues to work.

Although, I would argue to that breaking changes are sometimes good. That's what major version increments are for. If there is never a breaking change allowed, then the design will get worse and worse over time.

@amanda-tarafa
Copy link
Contributor

These libraries are currently under maintenance mode, which means we are not planning on adding major features or make significant implementation changes. The libraries are very well supported and will continue to be so in the long term, but just don't expect any re-haul, including for major improvements. It's just a matter of capacity.

@amanda-tarafa
Copy link
Contributor

BTW, see #2705, it's somewhat succint, but that's really all there is to it.

@clement911
Copy link
Author

I'm not sure I would consider this a major feature but that's up to you.

Stepping back, the fact that the .NET Google client library is in 'maintenance mode' really doesn't exactly inspire confidence or makes us want to bet further on Google APIs.

@amanda-tarafa
Copy link
Contributor

Being in maintenance mode does not mean unsupported or abandoned. We continue to fix bugs, we continue to implement any and all features (including major work) required for these libraries to seemlessly work in/for the Google echosystem, and we continue to implement some other minor features and some other improvements. We'll continue to do so for the long term.

Bigger improvements, redesign work etc. is not being considered at the moment. The libraries are certainly not perfect, but we consider them to be mature and complete.

amanda-tarafa added a commit that referenced this issue Mar 19, 2024
The documentation now reflects the usage of IDataStore by Google.Apis library.

Closes #2704
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: docs Improvement to the documentation for an API.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants