Algorithmic Approach to generating Unique traceable paths for uploads

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);


Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: