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

Rhizome database space patrol #10

Open
quixotique opened this issue Sep 11, 2012 · 5 comments
Open

Rhizome database space patrol #10

quixotique opened this issue Sep 11, 2012 · 5 comments
Assignees
Milestone

Comments

@quixotique
Copy link
Member

The Rhizome database currently grows without limit. The following features must be implemented:

  • remove old payloads when a manifest is updated with a new one
  • evict old content to stay within size limit setting

Mantis severity: minor
Mantis priority: normal
Mantis project: Core Project
Product version: 0.09 Shiny
Target version: 0.09 Shiny
Can reproduce: always

@ghost ghost assigned quixotique Sep 11, 2012
@quixotique
Copy link
Member Author

Originally reported as mantis:0000213 at Wed May 23 03:45:54 2012.

@quixotique
Copy link
Member Author

Issue migrated from Mantis to GitHub with Mantis status feedback and resolution reopened at Tue Sep 11 17:26:58 2012 using sp-mantis2github version 0.91

@quixotique
Copy link
Member Author

At Tue Sep 11 17:56:04 2012:

This issue is now being tracked on GitHub: servalproject/batphone#8

@quixotique
Copy link
Member Author

I propose the following approach to expiring and fetching bundles.

  1. Each Rhizome node keeps an ordered list of all the manifests known to it, including the manifests of advertised bundles whose payloads have not yet been fetched, and the manifests of expired bundles whose payloads have been evicted. This list is called the BUNDLE RANK.
  2. The ordering of the bundle rank will depend on the manifest contents and information known to the node itself, such as current date/time, available payload storage space, routing state (recently encountered SIDs), etc.
  3. When a new bundle advertisement is received, its manifest is fetched and inserted into the rank. Rhizome then iterates down the rank, counting the space required by each bundle until the storage limit is reached. The payloads of all bundles beyond the storage limit are evicted to reclaim the space. The missing payloads of any bundles before the storage limit are fetched to occupy the space.
  4. It would be nice to be able to sort the rhizome list output in rank order. This would allow the construction of a diagnostic display in the Batphone app showing the Rhizome store, which could dynamically update showing incoming bundles and bundle expiry.

@lakeman
Copy link
Member

lakeman commented Jun 26, 2014

The rhizome storage layer will now evict older and/or larger payloads when space is required to insert a new payload. Only the space of a single new payload is considered, we do not track the total set of all transfers in progress.
Two configuration options have been created to limit the size of the store; rhizome.database_size & rhizome.min_free_space.
None of the other suggested changes have been made to the way bundles are fetched.
See 47f0519, 5df5a33

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

No branches or pull requests

2 participants