Uploaded image for project: 'Skara'
  1. Skara
  2. SKARA-2419

Rewrite HostedRepositoryStorage to use direct file read/write API

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • None
    • libraries
    • None

      A common solution for storing persistent data in bots is through the Storage interface, which is implemented by HostedRepositoryStorage. This implementation uses a single file inside a remote repository. The repository is cloned and updated and when changes are made, they are committed and pushed. The drawback of this model is that it scales badly with repository size. The bots typically have 16-32 scratch directories, and inside each of these there may be a number of different instances of a HostedRepositoryStorage for the same remote repository. This results in a large number of ever growing repositories on disk.

      In other bots, we have already converted similar data storage models to using direct read/write file calls on the HostedRepository instead of working with local clones of a repository. I think we should move to the same model here. From what I can tell, it should be reasonably straightforward to implement a variant of the HostedRepositoryStorage that uses direct read and write calls. The model here is that each Storage instance only reads and modifies a single file in the repo, which suits the direct read/write model well.

            Unassigned Unassigned
            erikj Erik Joelsson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: