-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
Having a relational database with indexes might be better for #141. The new structure I'm envisioning would keep the statedb and use that as the queue by way of indexes:
| Mode | state | progress | score | elapsed | remaining | hist | prev | next | in-memory-queue | won |
|---|---|---|---|---|---|---|---|---|---|---|
| lookup | = x | |||||||||
| insert | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| update | = x | set min | set | set | set | set | ||||
| process | = x | set | set false | |||||||
| evict | = x | set true | ||||||||
| retrieve | = x | sort | sort | sort | = false, set true | |||||
| recover | set false if true | |||||||||
| solutions | sort | = true |
- Our statedb lookups are for data at the primary key (state).
- As we process states, we insert the new states (or update the ones we've found faster routes to), and update the processed states with the
nextsteps. - Evicting from the in-memory-queue simply flips the bit.
- Retrieving states looks for states with the in-memory-queue bit set to false (and then sets them to true)
- On recovery, we can either retrieve all the elements marked as being in the memory queue, or set them all back to false and perform a retrieve.
- And we can retrieve solutions directly on recovery as well.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed