Skip to content
This repository has been archived by the owner on Jan 6, 2020. It is now read-only.

ResourceHandler

Fraser Hutchison edited this page Jan 17, 2014 · 4 revisions

##Reason for feature Drive uses self encryptors for handling get/put data. These containers are currently handled by creating [Data Buffers] (https://github.com/maidsafe/MaidSafe-Private/blob/master/include/maidsafe/data_store/data_buffer.h). These buffers will hold temporary and old data (at times) in a mixture of memory and disk. The clean up of such buffers will have to be handled, otherwise resource limits will be met rather quickly and in an unmanaged fashion.

##Agreed approach

  • Change to use a single buffer for all files.
  • Add functionality to the buffer to allow grouping of data - in particular the deletion of a group of related data pieces.
  • Change Drive so that when a file remains closed for a given period (currently 2 seconds) all chunks associated with that file are removed from the buffer and its encryptor destructed.

This doesn't come close to addressing all concerns regarding Drive's resource management, but it hopefully provides a decent starting point. This paradigm should be easier to manage than the current one with a different buffer per file, and it will resolve the critical issue where buffers and encryptors are left undestructed indefinitely.

##Discussions

[mailing list] (https://groups.google.com/forum/#!topic/maidsafe-development/jqFlZW8UAXc)

##Developers

  • Fraser Hutchison
  • David Irvine

##Estimated timescale

  • 2 Days code
  • 3 days test Run in parallel, so 3 days work for a team of 2 people.

##Code reviewers

  • Chandra Prakash
  • Qi Ma

##Code review comments