Archive for December, 2010

Algorithmic Approach to generating Unique traceable paths for uploads

Posted in Apache, civiCRM, Dolphin, Drupal, Flex, Joomla, Linux, mysql, NoSQL, PHP, Technical, Uncategorized, Wordpress, work with tags , , , , , , on December 23, 2010 by saffrongeek

Some thoughts used to model a system which had to actually address the approach for saving user materials.

Base conditions:

  1. Algorithm should always result unique member path for member as root.
  2. Each upload should branch within the above base condition1
  3. Ensure that not a single node grows more than a max sizelimit.

 

Member materials had to be uniquely placed and key to this was considered the following together.:-

a.Key1:loginname
b.Key2:metaxml filename used to build the list view of all member/members shared resourcelist

Unique upload material path for each upload/batch is derived with the following computation:-

$uploadFilesPath =
DirectoryObject->GenerateMemberHashPath(Key1, ‘member’) + “/” +
GenericClassObj->hashSlice(UrlHash($MetaFilename,Key1),FlagSL)+ “/” +
DirectoryObj->GenerateHashPath(UrlHash($MetaFilename,Key1),’member’,FlagType);


%d bloggers like this: