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

Add solver database #445

Open
bgins opened this issue Nov 19, 2024 · 0 comments · May be fixed by #462
Open

Add solver database #445

bgins opened this issue Nov 19, 2024 · 0 comments · May be fixed by #462

Comments

@bgins
Copy link
Contributor

bgins commented Nov 19, 2024

General Description

Add a solver database that implements the solver store interface.

Which system(s) or functionality does this affect

Directly affects the solver. Second-order effects on job creation and resource providers.

DevOps work to deploy the new database.

Describe the changes, and how this affects/ interacts with each system

This feature adds a solver store database for job offers, resource offers, deals, match decisions, and results metadata.

Our current implementation stores data in memory. This implementation blocks us from horizontally scaling the solver because it's state can only exist in one machine's memory. Moving the data into a database is a first step towards horizontally scaling the solver and persisting state through reboots and deploys.

We will initially add a Postgres database that stores each of these items as jsonb blobs. We will add indexes for common queries, such as wallet addresses and deal IDs. Over time, we can move towards a relational model as we stabilize our data types across the protocol.

The feature has second-order effects on job creators and resource providers by persisting their offers across instances and deployments. This persistence means resource providers do not need to re-submit their resource offers and job offers will not be dropped.

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

Successfully merging a pull request may close this issue.

2 participants