Skip to content

Conversation

Kleidukos
Copy link
Member

@Kleidukos Kleidukos commented May 12, 2025

Follow-up of #1375 to use a Map rather than storing usernames in acid-state.

Since the datatype used for storage no longer reflects the shape of the API payload, I made a separate DTO for it.

@Kleidukos
Copy link
Member Author

@gbaz I'm still unclear on how to initialise the Map and keep it updated. Shall we pass it in a TVar, and update it in the upload endpoint? Again, I'm very unfamiliar with the usual patterns of this project, but I'm willing to learn! :)

@Kleidukos
Copy link
Member Author

Kleidukos commented May 22, 2025

@gbaz I'd be grateful if you could help me put the last pieces of the puzzle together, when time permits. :)

@gbaz
Copy link
Contributor

gbaz commented May 25, 2025

ok i think i see the confusion. what i mean is why do we need any acid-state for any of this? can't we just compute it on the fly? before i had suggested a better way to cache, but i don't think we need to cache it either. hitting these endpoints should be rare, and all the data is available to query elsewhere. I think we shouldn't need acid-state specific to back this json endpoint at all, much less to migrate it.

@Kleidukos
Copy link
Member Author

@gbaz ok then I must be mis-understanding the role of acid-state. In my head it's the one source of truth to fetch persistent data related to the index, including who has uploaded what. If the data isn't coming from acid-state, where does it come from?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants