Proposal for Enhancing PersistencyStorageProvider Interface Flexibility #625
samDobsonDev
started this conversation in
Ideas
Replies: 2 comments
-
|
Hi @samDobsonDev, thank you for the proposal! |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Nice |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The current design of the
PersistencyStorageProviderinterface requires each request to instantiate its own storage provider object. This approach can lead to scalability challenges, particularly in high-concurrency environments. This is because the interface does not currently support filtering based on user-specific or request-specific metrics, necessitating multiple instances for different filters that are passed in as constructor parameters. ThePersistencyStorageProviderclass is essentially a repository, so developers should have the option to use it as a singleton.Proposed Enhancement:
Introduce a more flexible interface that allows developers to define their own filtering criteria. This can be achieved by allowing the interface methods to accept optional parameters for filtering, without prescribing a specific data structure or implementation.
Proposed Interface Concept:
This would allow for classes to implement this interface like this:
data class CheckpointFilter(val userId: String, val time: Long)Benefits:
Discussion Points:
Beta Was this translation helpful? Give feedback.
All reactions