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

[epic] move in-memory datastructures to the database #115

Closed
12 tasks done
2opremio opened this issue Mar 27, 2024 · 3 comments
Closed
12 tasks done

[epic] move in-memory datastructures to the database #115

2opremio opened this issue Mar 27, 2024 · 3 comments

Comments

@2opremio
Copy link
Contributor

2opremio commented Mar 27, 2024

What problem does your feature solve?

Reduces memory consumption so that we can extend the default history retention to one week (currently at 2 hours for transactions and 24 hours for events). See the analysis document for details.

What would you like to see?

I would like to see the in-memory data-structures (Currently based around LedgerBucketWindow) stored in the database instead of in-memory.

Regarding the DB schema, we can either roughly mirror what's kept in memory or use some sort of indexing on the txmeta which is already kept in the DB.

We should also have the bigger picture in mind when modifying the schema. The chosen schema should consider extensibility to implement the new Soroban RPC endoints.

I suggest presenting a schema design which should be peer reviewed before jumping to the implementation.

As an output of this ticket we should also get a performance comparison (e.g. through a purposely built Golang benchmark)

What alternatives are there?

The performance shouldn't considerably degrade. If it does, we should consider caching recent data (particularly for transactions). However, a hybrid in-memory/db approach increases complexity.

Subtasks

Design

Implementation (Transactions)

  1. rpc-sdk-scrum
  2. Shaptic
  3. Shaptic
  4. objective-5
    psheth9
  5. objective-5
    aditya1702

Implementation [Events]

  1. objective-5
    psheth9
  2. rpc-sdk-scrum
    psheth9
  3. rpc-sdk-scrum
    psheth9
  4. rpc-sdk-scrum
    aditya1702
@2opremio
Copy link
Contributor Author

Related: #60

@mollykarcher mollykarcher added this to the platform sprint 45 milestone Mar 27, 2024
@mollykarcher mollykarcher changed the title Move in-memory datastructures to the database [epic] move in-memory datastructures to the database Apr 11, 2024
@2opremio
Copy link
Contributor Author

@psheth9 can we close this?

Did you do performance tests in AWS?

@psheth9
Copy link
Contributor

psheth9 commented Aug 29, 2024

Yes I am closing this !!

Also performance and sanity checks are being done in this issue

@psheth9 psheth9 closed this as completed Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

6 participants