-
Notifications
You must be signed in to change notification settings - Fork 76
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
List all partition keys of an application #482
Comments
@shun-liang question, what filters would you want if any on this? I'm just thinking ahead because all partition keys could be expensive in certain situations. E.g. get me active ones since X timestamp, or get me all created since X timestamp, etc. Alternatively, you could manage this in a datastore/database outside of Burr. |
I would imagine it being very integral with the state, maybe something like how a condition is defined?
Indeed this can be the case. In the end the users needs to be well aware of the pros and cons choosing the persistance backend, but maybe burr as the library can provide opinions and advices in the doc?
True. However this does require the user to dig into the persister implementation to understand they work. |
I was thinking you'd maintain a separate DB table, or something separate from the persister. E.g. something tied together/closer to your authentication system. Since generally the parition_key should map to some "user Id" or other identifier. In which case you could then use that to figure out what partition_keys would exist. |
Oh interesting. That might be too slow since we'd be dealing with serialized data (we'd have to think about custom indexes or some other data structure to help facilitate this). My first thought was around timestamps at the minimum. |
IMO it's more likely that you'd want a paginated API -- E.G. a way to grab the first 100 users, etc... Then you'll also want a way to search for users. For less than, like, 100k, you can likely send them all over the wire and process it client-side, so it might be that just a |
Is your feature request related to a problem? Please describe.
Right now, burr does not provide an interface to list all
partition_key
s of an application.Quoting from the documentation:
Imagine we are implementing an admin page for the system managing the chatbot, and need to display all the users' chat sessions, that the interface to retrieve all the
partition_key
s from an application should become necessary.Describe the solution you'd like
Maybe a method from the application to retrieve all the
partition_key
s?Describe alternatives you've considered
Direct data retrieval from the storage where the states of the application are persisted.
Additional context
None
The text was updated successfully, but these errors were encountered: