blob: fdb38fd00c3f1c161489d23f5d13874fec109f6e [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="SMILA/Project Concepts/Binary Storage" />
<link rel="shortcut icon" href="http://wiki.eclipse.org/SMILA/Project_Concepts/favicon.ico" />
<link rel="search" type="application/opensearchdescription+xml" href="http://wiki.eclipse.org/opensearch_desc.php" title="Eclipsepedia (English)" />
<link rel="alternate" type="application/rss+xml" title="Eclipsepedia RSS Feed" href="http://wiki.eclipse.org/index.php?title=Special:Recentchanges&amp;feed=rss" />
<link rel="alternate" type="application/atom+xml" title="Eclipsepedia Atom Feed" href="http://wiki.eclipse.org/index.php?title=Special:Recentchanges&amp;feed=atom" />
<title>SMILA/Project Concepts/Binary Storage - Eclipsepedia</title>
<style type="text/css" media="screen,projection">/*<![CDATA[*/ @import "/skins/eclipsenova/novaWide.css?116"; /*]]>*/</style>
<link rel="stylesheet" type="text/css" media="print" href="http://wiki.eclipse.org/skins/eclipsenova/eclipsenovaPrint.css?116" />
<link rel="stylesheet" type="text/css" media="handheld" href="http://wiki.eclipse.org/skins/eclipsenova/handheld.css?116" />
<link rel="stylesheet" type="text/css" href="http://wiki.eclipse.org/skins/eclipsenova/Nova/css/header.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://wiki.eclipse.org/skins/eclipsenova/tabs.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://wiki.eclipse.org/skins/eclipsenova/Nova/css/visual.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://wiki.eclipse.org/skins/eclipsenova/Nova/css/layout.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://wiki.eclipse.org/skins/eclipsenova/Nova/css/footer.css" media="screen" />
<!--[if IE]><link rel="stylesheet" type="text/css" href="/skins/eclipsenova/IEpngfix.css" media="screen" /><![endif]-->
<!--[if lt IE 5.5000]><style type="text/css">@import "/skins/eclipsenova/IE50Fixes.css?116";</style> <![endif]-->
<!--[if IE 5.5000]><style type="text/css">@import "/skins/eclipsenova/IE55Fixes.css?116";</style><![endif]-->
<!--[if IE 6]><style type="text/css">@import "/skins/eclipsenova/IE60Fixes.css?116";</style><![endif]-->
<!--[if IE 7]><style type="text/css">@import "/skins/eclipsenova/IE70Fixes.css?116";</style><![endif]-->
<!--[if lt IE 7]><script type="text/javascript" src="/skins/common/IEFixes.js?116"></script>
<meta http-equiv="imagetoolbar" content="no" /><![endif]-->
<script type= "text/javascript">/*<![CDATA[*/
var skin = "eclipsenova";
var stylepath = "/skins";
var wgArticlePath = "/$1";
var wgScriptPath = "";
var wgScript = "/index.php";
var wgServer = "http://wiki.eclipse.org";
var wgCanonicalNamespace = "";
var wgCanonicalSpecialPageName = false;
var wgNamespaceNumber = 0;
var wgPageName = "SMILA/Project_Concepts/Binary_Storage";
var wgTitle = "SMILA/Project Concepts/Binary Storage";
var wgAction = "view";
var wgRestrictionEdit = [];
var wgRestrictionMove = [];
var wgArticleId = "16278";
var wgIsArticle = true;
var wgUserName = null;
var wgUserGroups = null;
var wgUserLanguage = "en";
var wgContentLanguage = "en";
var wgBreakFrames = false;
var wgCurRevisionId = "129000";
var wgVersion = "1.12.0";
var wgEnableAPI = true;
var wgEnableWriteAPI = false;
/*]]>*/</script>
<script type="text/javascript" src="http://wiki.eclipse.org/skins/common/wikibits.js?116"><!-- wikibits js --></script>
<!-- Performance mods similar to those for bug 166401 -->
<script type="text/javascript" src="http://wiki.eclipse.org/index.php?title=-&amp;action=raw&amp;gen=js&amp;useskin=eclipsenova"><!-- site js --></script>
<!-- Head Scripts -->
<script type="text/javascript" src="http://wiki.eclipse.org/skins/common/ajax.js?116"></script>
<style type="text/css">/*<![CDATA[*/
.source-java {line-height: normal; font-size: medium;}
.source-java li {line-height: normal;}
/**
* GeSHi Dynamically Generated Stylesheet
* --------------------------------------
* Dynamically generated stylesheet for java
* CSS class: source-java, CSS id:
* GeSHi (C) 2004 - 2007 Nigel McNie (http://qbnz.com/highlighter)
*/
.source-java .de1, .source-java .de2 {font-family: 'Courier New', Courier, monospace; font-weight: normal;}
.source-java {}
.source-java .head {}
.source-java .foot {}
.source-java .imp {font-weight: bold; color: red;}
.source-java .ln-xtra {color: #cc0; background-color: #ffc;}
.source-java li {font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;}
.source-java li.li2 {font-weight: bold;}
.source-java .kw1 {color: #7F0055; font-weight: bold;}
.source-java .kw2 {color: #7F0055; font-weight: bold;}
.source-java .kw3 {color: #000000; font-weight: normal}
.source-java .kw4 {color: #7F0055; font-weight: bold;}
.source-java .co1 {color: #3F7F5F; font-style: italic;}
.source-java .co2 {color: #3F7F5F;}
.source-java .co3 {color: #3F7F5F; font-style: italic; font-weight: bold;}
.source-java .coMULTI {color: #3F5FBF; font-style: italic;}
.source-java .es0 {color: #000000;}
.source-java .br0 {color: #000000;}
.source-java .st0 {color: #2A00ff;}
.source-java .nu0 {color: #000000;}
.source-java .me1 {color: #000000;}
.source-java .me2 {color: #000000;}
/*]]>*/
</style>
<style type="text/css">/*<![CDATA[*/
@import "/index.php?title=MediaWiki:Geshi.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000";
/*]]>*/
</style><link rel="stylesheet" type="text/css" href="Binary_Storage.html" /> </head>
<body class="mediawiki ns-0 ltr page-SMILA_Project_Concepts_Binary_Storage">
<div id="globalWrapper">
<div id="column-one">
<!-- Eclipse Additions for the Top Nav start here M. Ward-->
<div id="header">
<div id="header-graphic">
<img src="http://wiki.eclipse.org/skins/eclipsenova/eclipse.png" alt="Eclipse Wiki">
</div>
<!-- Pulled 101409 Mward -->
<div class="portlet" id="p-personal">
<div class="pBody">
<ul>
<li id="pt-login"><a href="http://wiki.eclipse.org/index.php?title=Special:Userlogin&amp;returnto=SMILA/Project_Concepts/Binary_Storage">Log in</a></li>
</ul>
</div>
</div>
<div id="header-icons">
<div id="sites">
<ul id="sitesUL">
<li><a href="http://www.eclipse.org"><img src="http://dev.eclipse.org/custom_icons/eclipseIcon.png" width="28" height="28" alt="Eclipse Foundation" title="Eclipse Foundation" /><div>Eclipse Foundation</div></a></li>
<li><a href="http://marketplace.eclipse.org"><img src="http://dev.eclipse.org/custom_icons/marketplace.png" width="28" height="28" alt="Eclipse Marketplace" title="Eclipse Marketplace" /><div>Eclipse Marketplace</div></a></li>
<li><a href="https://bugs.eclipse.org/bugs"><img src="http://dev.eclipse.org/custom_icons/system-search-bw.png" width="28" height="28" alt="Bugzilla" title="Bugzilla" /><div>Bugzilla</div></a></li>
<li><a href="http://live.eclipse.org"><img src="http://dev.eclipse.org/custom_icons/audio-input-microphone-bw.png" width="28" height="28" alt="Live" title="Live" /><div>Eclipse Live</div></a></li>
<li><a href="http://planeteclipse.org"><img src="http://dev.eclipse.org/large_icons/devices/audio-card.png" width="28" height="28" alt="PlanetEclipse" title="Planet" /><div>Planet Eclipse</div></a></li>
<li><a href="http://portal.eclipse.org"><img src="http://dev.eclipse.org/custom_icons/preferences-system-network-proxy-bw.png" width="28" height="28" alt="Portal" title="Portal" /><div>My Foundation Portal</div></a></li>
</ul>
</div>
</div>
</div>
<!-- NEW HEADER STUFF HERE -->
<div id="header-menu">
<div id="header-nav">
<ul> <li><a class="first_one" href="http://wiki.eclipse.org/" target="_self">Home</a></li> <li><a href="http://www.eclipse.org/downloads/" target="_self">Downloads</a></li>
<li><a href="http://www.eclipse.org/users/" target="_self">Users</a></li>
<li><a href="http://www.eclipse.org/membership/" target="_self">Members</a></li>
<li><a href="http://wiki.eclipse.org/index.php/Development_Resources" target="_self">Committers</a></li>
<li><a href="http://www.eclipse.org/resources/" target="_self">Resources</a></li>
<li><a href="http://www.eclipse.org/projects/" target="_self">Projects</a></li>
<li><a href="http://www.eclipse.org/org/" target="_self">About Us</a></li>
</ul>
</div>
<div id="header-utils">
<!-- moved the search window here -->
<form action="http://wiki.eclipse.org/Special:Search" >
<input class="input" name="search" type="text" accesskey="f" value="" />
<input type='submit' onclick="this.submit();" name="go" id="searchGoButton" class="button" title="Go to a page with this exact name if one exists" value="Go" />&nbsp;
<input type='submit' onclick="this.submit();" name="fulltext" class="button" id="mw-searchButton" title="Search Eclipsepedia for this text" value="Search" />
</form>
</div>
</div>
<!-- Eclipse Additions for the Header stop here -->
<!-- Additions and mods for leftside nav Start here -->
<!--Started nav rip here-->
<!-- these are the nav controls main page, changes etc -->
<div id="novaContent" class="faux">
<div id="leftcol">
<ul id="leftnav">
<!-- these are the page controls, edit history etc -->
<li class="separator"><a class="separator">Navigation &#160;&#160;</li>
<li id="n-mainpage"><a href="http://wiki.eclipse.org/Main_Page">Main Page</a></li>
<li id="n-portal"><a href="http://wiki.eclipse.org/Eclipsepedia:Community_Portal">Community portal</a></li>
<li id="n-currentevents"><a href="http://wiki.eclipse.org/Eclipsepedia:Current_events">Current events</a></li>
<li id="n-recentchanges"><a href="http://wiki.eclipse.org/Special:Recentchanges">Recent changes</a></li>
<li id="n-randompage"><a href="http://wiki.eclipse.org/Special:Random">Random page</a></li>
<li id="n-help"><a href="http://wiki.eclipse.org/Help:Contents">Help</a></li>
<li class="separator"><a class="separator">Toolbox &#160;&#160;</a></li>
<li id="t-whatlinkshere"><a href="http://wiki.eclipse.org/Special:Whatlinkshere/SMILA/Project_Concepts/Binary_Storage">What links here</a></li>
<li id="t-recentchangeslinked"><a href="http://wiki.eclipse.org/Special:Recentchangeslinked/SMILA/Project_Concepts/Binary_Storage">Related changes</a></li>
<!-- This is the toolbox section -->
<li id="t-upload"><a href="http://wiki.eclipse.org/Special:Upload">Upload file</a></li>
<li id="t-specialpages"><a href="http://wiki.eclipse.org/Special:Specialpages">Special pages</a></li>
<li id="t-print"><a href="http://wiki.eclipse.org/index.php?title=SMILA/Project_Concepts/Binary_Storage&amp;printable=yes">Printable version</a></li> <li id="t-permalink"><a href="http://wiki.eclipse.org/index.php?title=SMILA/Project_Concepts/Binary_Storage&amp;oldid=129000">Permanent link</a></li> </ul>
</div>
<!-- Additions and mods for leftside nav End here -->
<div id="column-content">
<div id="content">
<a name="top" id="top"></a>
<div id="tabs">
<ul class="primary">
<li class="active"><a href="Binary_Storage.html"><span class="tab">Page</span></a></li>
<li><a href="http://wiki.eclipse.org/index.php?title=Talk:SMILA/Project_Concepts/Binary_Storage&amp;action=edit"><span class="tab">Discussion</span></a></li>
<li><a href="http://wiki.eclipse.org/index.php?title=SMILA/Project_Concepts/Binary_Storage&amp;action=edit"><span class="tab">View source</span></a></li>
<li><a href="http://wiki.eclipse.org/index.php?title=SMILA/Project_Concepts/Binary_Storage&amp;action=history"><span class="tab">History</span></a></li>
<li><a href="http://wiki.eclipse.org/index.php?title=Special:Userlogin&amp;returnto=SMILA/Project%20Concepts/Binary%20Storage"><span class="tab">Edit</span></a></li>
</ul>
</div>
<script type="text/javascript"> if (window.isMSIE55) fixalpha(); </script>
<h1 class="firstHeading">SMILA/Project Concepts/Binary Storage</h1>
<div id="bodyContent">
<h3 id="siteSub">From Eclipsepedia</h3>
<div id="contentSub"><span class="subpages">&lt; <a href="../../SMILA.html" title="SMILA">SMILA</a> | <a href="../Project_Concepts.1.html" title="SMILA/Project Concepts">Project Concepts</a></span></div>
<div id="jump-to-nav">Jump to: <a href="Binary_Storage.html#column-one">navigation</a>, <a href="Binary_Storage.html#searchInput">search</a></div> <!-- start content -->
<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
<ul>
<li class="toclevel-1"><a href="Binary_Storage.html#Overview"><span class="tocnumber">1</span> <span class="toctext">Overview</span></a></li>
<li class="toclevel-1"><a href="Binary_Storage.html#Description"><span class="tocnumber">2</span> <span class="toctext">Description</span></a></li>
<li class="toclevel-1"><a href="Binary_Storage.html#Storage_Mechanism_Internal_Structure."><span class="tocnumber">3</span> <span class="toctext">Storage Mechanism Internal Structure.</span></a>
<ul>
<li class="toclevel-2"><a href="Binary_Storage.html#A._File_System"><span class="tocnumber">3.1</span> <span class="toctext">A. File System</span></a></li>
<li class="toclevel-2"><a href="Binary_Storage.html#I._Local_hard_drive"><span class="tocnumber">3.2</span> <span class="toctext">I. Local hard drive</span></a>
<ul>
<li class="toclevel-3"><a href="Binary_Storage.html#1._Flat_structure"><span class="tocnumber">3.2.1</span> <span class="toctext">1. Flat structure</span></a></li>
<li class="toclevel-3"><a href="Binary_Storage.html#2._Hierarchical_structure_.28configurable_tree.29"><span class="tocnumber">3.2.2</span> <span class="toctext">2. Hierarchical structure (configurable tree)</span></a>
<ul>
<li class="toclevel-4"><a href="Binary_Storage.html#Hierarchical_structure_nomenclature._Test_scenario"><span class="tocnumber">3.2.2.1</span> <span class="toctext">Hierarchical structure nomenclature. Test scenario</span></a></li>
</ul>
</li>
<li class="toclevel-3"><a href="Binary_Storage.html#3._Hierarchical_structure_.28deterministically_calculation.29"><span class="tocnumber">3.2.3</span> <span class="toctext">3. Hierarchical structure (deterministically calculation)</span></a></li>
<li class="toclevel-3"><a href="Binary_Storage.html#Analyze_of_hierarchical_structure"><span class="tocnumber">3.2.4</span> <span class="toctext">Analyze of hierarchical structure</span></a></li>
</ul>
</li>
<li class="toclevel-2"><a href="Binary_Storage.html#II._Distributed_file_system_.28SFTP.2C_FTP.29"><span class="tocnumber">3.3</span> <span class="toctext">II. Distributed file system (SFTP, FTP)</span></a>
<ul>
<li class="toclevel-3"><a href="Binary_Storage.html#1._Flat_structure_2"><span class="tocnumber">3.3.1</span> <span class="toctext">1. Flat structure</span></a></li>
<li class="toclevel-3"><a href="Binary_Storage.html#2._Hierarchical_structure_.28configurable_tree.29_2"><span class="tocnumber">3.3.2</span> <span class="toctext">2. Hierarchical structure (configurable tree)</span></a></li>
<li class="toclevel-3"><a href="Binary_Storage.html#3._Hierarchical_structure_.28deterministically_calculation.29_2"><span class="tocnumber">3.3.3</span> <span class="toctext">3. Hierarchical structure (deterministically calculation)</span></a></li>
</ul>
</li>
<li class="toclevel-2"><a href="Binary_Storage.html#B._RDBMS"><span class="tocnumber">3.4</span> <span class="toctext">B. RDBMS</span></a></li>
<li class="toclevel-2"><a href="Binary_Storage.html#C._Object_DataBase"><span class="tocnumber">3.5</span> <span class="toctext">C. Object DataBase</span></a></li>
</ul>
</li>
<li class="toclevel-1"><a href="Binary_Storage.html#Cluster_configuration"><span class="tocnumber">4</span> <span class="toctext">Cluster configuration</span></a></li>
<li class="toclevel-1"><a href="Binary_Storage.html#Concurrent_access"><span class="tocnumber">5</span> <span class="toctext">Concurrent access</span></a></li>
<li class="toclevel-1"><a href="Binary_Storage.html#Technical_aspects_for_designing_the_Binary_Storage_Service"><span class="tocnumber">6</span> <span class="toctext">Technical aspects for designing the Binary Storage Service</span></a></li>
<li class="toclevel-1"><a href="Binary_Storage.html#UML_Class_Diagram"><span class="tocnumber">7</span> <span class="toctext">UML Class Diagram</span></a></li>
<li class="toclevel-1"><a href="Binary_Storage.html#Test_Results"><span class="tocnumber">8</span> <span class="toctext">Test Results</span></a></li>
</ul>
</td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
<a name="Overview"></a><h2> <span class="mw-headline"> Overview</span></h2>
<p>Design a service to easy store / access binary data documents.
</p>
<a name="Description"></a><h2> <span class="mw-headline"> Description </span></h2>
<p>Client components will access the Binary Storage Service for persisting binary data (attachments) into the binary storage. The binary data shall be simply identified by a unique key / identifier as a String data type. No directly client component access to the persistence storage shall be available; the persistence storage will be only accessible through the Binary Storage Service API which provides the needed CRUD operations.
</p><p>Backend mechanism of Binary Storage shall be completely transparent to the client, thus user shall have the opportunity to setup basic configuration of the service. Binary Storage shall be able to determine and use default/optimistic configuration in case no one is specified by the user.
</p>
<a name="Storage_Mechanism_Internal_Structure."></a><h2> <span class="mw-headline"> Storage Mechanism Internal Structure. </span></h2>
<p>Binary Storage will depend on the amount of data it needs to persist/manage. Because of this the persistence storage of service shall be able to deal with fallowing persistence structures/techniques, depending on service configuration:
</p>
<ul><li> A. File System
<ul><li> I. Local hard drive
<ul><li> 1. Flat structure
</li><li> 2. Hierarchical structure (configurable tree)
</li><li> 3. Hierarchical structure (deterministically calculation)
</li><li> Analyze of hierarchical structure
</li></ul>
</li><li> II. Distributed file system (SFTP, FTP)
<ul><li> 1. Flat structure
</li><li> 2. Hierarchical structure (configurable tree)
</li><li> 3. Hierarchical structure (deterministically calculation)
</li></ul>
</li></ul>
</li><li> B. RDBMS
</li><li> C. Object DataBase (ODBMS)
</li></ul>
<p>One of the persistence options will be used by the Binary Storage Service at the running time. Internally, the DAO &amp; DAO Factory concept provides the appropriate/configured persistence option implementation to the Binary Storage Service independently. User can shall configure its appropriate persistence option that satisfies his/her needs.
</p><p><a href="http://wiki.eclipse.org/Image:SMILA-BinaryStorage-HighLevel.jpg" class="image" title="Image:SMILA-BinaryStorage-HighLevel.jpg"><img alt="Image:SMILA-BinaryStorage-HighLevel.jpg" src="http://wiki.eclipse.org/images/9/90/SMILA-BinaryStorage-HighLevel.jpg" width="736" height="727" border="0" /></a>
</p>
<a name="A._File_System"></a><h3> <span class="mw-headline"> A. File System </span></h3>
<p>Binary Storage Service saves the binary data directly in the file system.
</p>
<a name="I._Local_hard_drive"></a><h3> <span class="mw-headline"> I. Local hard drive </span></h3>
<p>The service saves data in the local drive using a predefined persistence storage location - binary.storage.root.path. Under this root path Binary Storage will create its files system structures flat or hierarchical, depending on the configuration.
</p>
<a name="1._Flat_structure"></a><h4> <span class="mw-headline"> 1. Flat structure </span></h4>
<p>The file system - flat structure configuration shall be used in case of small amount of data, since all the attachments will be saved in the same path location. For huge amount of data the systems becomes very slow, time responding increases significantly.
</p><p>This option shall only be used for debugging purpose, since it offers an easy way for locating a specific persisted attachment.
</p><p>In case of no initial configuration is provided by the user, the file system - flat structure option shall not be used as default.
</p><p><a href="http://wiki.eclipse.org/Image:SMILA-BinaryStorage-Flat.jpg" class="image" title="Image:SMILA-BinaryStorage-Flat.jpg"><img alt="Image:SMILA-BinaryStorage-Flat.jpg" src="http://wiki.eclipse.org/images/9/99/SMILA-BinaryStorage-Flat.jpg" width="566" height="172" border="0" /></a>
</p>
<a name="2._Hierarchical_structure_.28configurable_tree.29"></a><h4> <span class="mw-headline"> 2. Hierarchical structure (configurable tree) </span></h4>
<p>Through the hierarchical file system persistence, Binary Storage Service will manage by itself a configurable &amp; hierarchically &amp; internal structure under the configured persistence storage root path. This is to be considered the default configuration.
Following parameters are available for configuring the hierarchical structure:
</p>
<ul><li> q - Maximum number of subfolders per folder
</li><li> r - Maximum number of persisted attachments per folder
</li></ul>
<p>The hierarchical (tree) structure is being created during the the storage of new data (the initial number of binary data which is going to be persisted is unknown for Binary Storage Service).
</p><p><i>The configurable tree - hierarchic structure algorithm, will not be based on the B-Tree structure since it will get modified very often because of the deleting/inserting records operations (this is specific for b-tree delete/insert operations), so the b-tree structure needs to be update (like moving up in the hierarchy of some leaf-records) in order to keep the tree height balanced. Depending on the level of the b-tree, these "moving/migrating operations" could consist in large operations (which involves the number of records that need to be moved and the size of these records). For example inserting/deleting of simple record needs to re-balance the b-tree structure by moving very large records in a distributed file system.</i>
</p>
<a name="Hierarchical_structure_nomenclature._Test_scenario"></a><h5> <span class="mw-headline"> Hierarchical structure nomenclature. Test scenario </span></h5>
<p>Fallowing picture outlines the hierarchic overview, file system nomenclature and binary data distribution (persistence) inside the tree structure. In the illustrated sample , our test scenario uses a total number of attachments to be stored 360. The configuration values are&nbsp;:
</p>
<pre>q = 3 (maximum 3 subfolders per folder in the hierarchy)
r = 10 (maximum 10 files stored in a folder inside of the hierarchic structure)
t = 360 (total number of attachments-files to be stored)
</pre>
<p>As it is outlined in the picture, the total number of subfolders from hierarchy structure represents a geometric progression (in mathematics also known as a geometric sequence), where each term (number of folders from the same level of the hierarchy) after the first is found by multiplying the previous one by a fixed non-zero number called the common ratio. The common ration identifies with maximum number of sub-folders per folder - q.
</p><p>For a optimistic hierarchy, it is possible to determine fallowing parameters in order to configure the hierarchy as user expects:
</p>
<ul><li> total number of folders from structure (t/r) - 36
</li><li> total number of subfolder at each level from the structure - Bn formula. (b1= 1 folder at the first level; b2=3 folders at the second level; b3=9 folders at the third level; b4=23 folders at the fourth level)
</li><li> total number of subfolders from the hierarchy (in full mode) - Sn formula
</li><li> total number of subfolders from the deepest level&nbsp;: 23 folders, Bn' = Bn - (Sn - t/r). (Bn=27; Sn=40; t/r=36)
</li><li> hierarchy level - n=4 (logarithmical function)
</li></ul>
<p><a href="http://wiki.eclipse.org/Image:SMILA-BinaryStorage-Hierarchical.jpg" class="image" title="Image:SMILA-BinaryStorage-Hierarchical.jpg"><img alt="Image:SMILA-BinaryStorage-Hierarchical.jpg" src="http://wiki.eclipse.org/images/5/5d/SMILA-BinaryStorage-Hierarchical.jpg" width="1020" height="755" border="0" /></a>
</p><p>Binary Storage Service has to map each attachment identifier to the path where the binary data is being stored. The mappings needs to be persisted so they can be reused if the system gets restarted.
</p><p>An external manipulation of persistence storage structure (like deleting data form inside of it) will break the mappings. This is considered an exceptional case and it is not in the Binary Storage Service scope.
</p><p>Fallowing table provides an overview of the hierarchical structure based on configured parameters:
</p>
<table border="1">
<tr>
<th style="background-color: #eeeeee; width:12%"> t (number of attachments)
</th><th style="background-color: #eeeeee;width:12%"> q (max number of subfolders in folder)
</th><th style="background-color: #eeeeee;width:12%"> r (max number of att.in folder)
</th><th style="width:12%"> TF (number of folders)
</th><th style="width:12%"> n (hierarchical level)
</th><th style="width:12%"> Sn (full mode hierarchy)
</th><th style="width:12%"> M (missing subfolders in deepest level)
</th></tr>
<tr>
<th style="background-color: #eeeeee;align:right"> 360
</th><th style="background-color: #eeeeee;align:right"> 3
</th><th style="background-color: #eeeeee;align:right"> 10
</th><th style="align:right"> 36
</th><th style="align:right"> 4
</th><th style="align:right"> 40
</th><th style="align:right"> 4
</th></tr>
<tr>
<th style="background-color: #eeeeee;align:right"> 1000000
</th><th style="background-color: #eeeeee;align:right"> 25
</th><th style="background-color: #eeeeee;align:right"> 200
</th><th style="align:right"> 5000
</th><th style="align:right"> 4
</th><th style="align:right"> 16276
</th><th style="align:right"> 11276
</th></tr>
<tr>
<th style="background-color: #eeeeee;align:right"> 1000000
</th><th style="background-color: #eeeeee;align:right"> 50
</th><th style="background-color: #eeeeee;align:right"> 200
</th><th style="align:right"> 5000
</th><th style="align:right"> 4
</th><th style="align:right"> 127551
</th><th style="align:right"> 122551
</th></tr>
<tr>
<th style="background-color: #eeeeee;align:right"> 1000000
</th><th style="background-color: #eeeeee;align:right"> 75
</th><th style="background-color: #eeeeee;align:right"> 300
</th><th style="align:right"> 3333
</th><th style="align:right"> 3
</th><th style="align:right"> 5701
</th><th style="align:right"> 2368
</th></tr>
<tr>
<th style="background-color: #eeeeee;align:right"> 1000000
</th><th style="background-color: #eeeeee;align:right"> 100
</th><th style="background-color: #eeeeee;align:right"> 300
</th><th style="align:right"> 3333
</th><th style="align:right"> 3
</th><th style="align:right"> 10101
</th><th style="align:right"> 6768
</th></tr>
<tr>
<th style="background-color: #eeeeee;align:right"> 1000000
</th><th style="background-color: #eeeeee;align:right"> 150
</th><th style="background-color: #eeeeee;align:right"> 300
</th><th style="align:right"> 3333
</th><th style="align:right"> 3
</th><th style="align:right"> 22651
</th><th style="align:right"> 19318
</th></tr>
<tr>
<th style="background-color: #eeeeee;align:right"> 1000000
</th><th style="background-color: #eeeeee;align:right"> 200
</th><th style="background-color: #eeeeee;align:right"> 350
</th><th style="align:right"> 2857
</th><th style="align:right"> 3
</th><th style="align:right"> 40201
</th><th style="align:right"> 37344
</th></tr>
<tr>
<th style="background-color: #eeeeee;align:right"> 1000000
</th><th style="background-color: #eeeeee;align:right"> 250
</th><th style="background-color: #eeeeee;align:right"> 500
</th><th style="align:right"> 2000
</th><th style="align:right"> 3
</th><th style="align:right"> 62751
</th><th style="align:right"> 60751
</th></tr>
<tr>
<th style="background-color: #eeeeee;align:right"> 1000000
</th><th style="background-color: #eeeeee;align:right"> 300
</th><th style="background-color: #eeeeee;align:right"> 750
</th><th style="align:right"> 1333
</th><th style="align:right"> 3
</th><th style="align:right"> 90301
</th><th style="align:right"> 88968
</th></tr>
<tr>
<th style="background-color: #eeeeee;align:right"> 1000000
</th><th style="background-color: #eeeeee;align:right"> 100
</th><th style="background-color: #eeeeee;align:right"> 400
</th><th style="align:right"> 2500
</th><th style="align:right"> 3
</th><th style="align:right"> 10101
</th><th style="align:right"> 7601
</th></tr>
<tr>
<th style="background-color: #eeeeee;align:right"> 1000000
</th><th style="background-color: #eeeeee;align:right"> 200
</th><th style="background-color: #eeeeee;align:right"> 500
</th><th style="align:right"> 2000
</th><th style="align:right"> 3
</th><th style="align:right"> 40201
</th><th style="align:right"> 38201
</th></tr>
<tr>
<th style="background-color: #eeeeee;align:right"> 1000000
</th><th style="background-color: #eeeeee;align:right"> 250
</th><th style="background-color: #eeeeee;align:right"> 600
</th><th style="align:right"> 1666
</th><th style="align:right"> 3
</th><th style="align:right"> 62751
</th><th style="align:right"> 61085
</th></tr>
<tr>
<th style="background-color: #eeeeee;align:right"> 1000000
</th><th style="background-color: #eeeeee;align:right"> 300
</th><th style="background-color: #eeeeee;align:right"> 750
</th><th style="align:right"> 1333
</th><th style="align:right"> 3
</th><th style="align:right"> 90301
</th><th style="align:right"> 88968
</th></tr>
<tr>
<th style="background-color: #eeeeee;align:right"> 1000000
</th><th style="background-color: #eeeeee;align:right"> 300
</th><th style="background-color: #eeeeee;align:right"> 1000
</th><th style="align:right"> 1000
</th><th style="align:right"> 3
</th><th style="align:right"> 90301
</th><th style="align:right"> 89301
</th></tr>
</table>
<a name="3._Hierarchical_structure_.28deterministically_calculation.29"></a><h4> <span class="mw-headline"> 3. Hierarchical structure (deterministically calculation) </span></h4>
<p>Another solution for building the hierarchical structure uses deterministically calculation based on the hash id, passed by the blackboard service to the Binary Storage Service.
The solution comes to avoid storing data into a single path location and to offer a hierarchic structure. The structure will be located under the binary.storage.root.path and it will be build by using parts from the passed hashed id.
</p><p>i.e. for a passed binary data, having the ID = "1d41cd87e735ceb23fdfafd814366b3ca9816e3dfce6fecc30560f8c242de", the deterministically calculation will assign fallowing path, where the record will be stored:
</p>
<pre> binary.storage.root.path\1d\41\cd\87\1d41cd87e735ceb23fdfafd814366b3ca9816e3dfce6fecc30560f8c242de
</pre>
<p>When using the deterministically calculation all data will be stored at the same hierarchic level.
</p><p>There are two parameters that could be configured in order to define the deterministically calculation:
</p>
<ul><li> hierarchy level (in our case n = 4)
</li><li> sub-tree (folder) name length (l = 2, these are the substring-parts starting from the left side of the hashed id, used to build the structure like&nbsp;: "1d", "41", "cd" and "87")
</li></ul>
<p>Because of the starting part of hashed id of different records (which define the hierarchic structure - deterministically calculation) may be different enough, it is very possible that in many cases there will be only single record stored into a deterministically calculated location (since there will be no match, or at least not enough, related to the left part of the hashed IDs - which defines the location where the record is going to be persisted). As a matter of fact, it is possible that a hierarchic structure to contains many subfolders that contain only one subfolder(not deepest level) or single record(deepest level). This my be an issue since most of the file system APIs creates listeners for all these sub-folders in order to provide cache (refresh) functionality, so for single record there will be 5 listeners (4 sub-folders + 1 record) created and memory consumption increases significantly.
</p><p><br />
</p>
<table border="1">
<tr>
<th style="background-color: #eeeeee; width:12%"> t (number of attachments)
</th><th style="background-color: #eeeeee;width:12%"> n (hierarchy level)
</th><th style="background-color: #eeeeee;width:12%"> l (sub-tree-folder name length )
</th><th style="width:12%"> TF (total number of folders)
</th></tr>
<tr>
<th style="background-color: #eeeeee;align:right"> 540
</th><th style="background-color: #eeeeee;align:right"> 4
</th><th style="background-color: #eeeeee;align:right"> 2
</th><th style="align:right"> 977
</th></tr>
<tr>
<th style="background-color: #eeeeee;align:right"> 19013
</th><th style="background-color: #eeeeee;align:right"> 4
</th><th style="background-color: #eeeeee;align:right"> 2
</th><th style="align:right"> 54503
</th></tr>
</table>
<p>As long as the records number to be stored gets higher, the matching coincidence (the first string part of the hashed IDs that is used by the deterministically calculation) increases and the system becomes more efficient - from the number of records to number of sub-folders report.
</p><p>Following image, represents a simple sample of hierarchical structure obtained with deterministically calculation. Since accessing (storing and fetching) of records is done based on the hashed ID, there is no necessary to save any mapping between the record and calculated path location.
</p><p><a href="http://wiki.eclipse.org/Image:SMILA-BinaryStorage-HierarchicalCalculation.jpg" class="image" title="Image:SMILA-BinaryStorage-HierarchicalCalculation.jpg"><img alt="Image:SMILA-BinaryStorage-HierarchicalCalculation.jpg" src="http://wiki.eclipse.org/images/8/80/SMILA-BinaryStorage-HierarchicalCalculation.jpg" width="688" height="788" border="0" /></a>
</p><p>The sample, also outlines hashed ID part matching on first hierarchic level which means common usage of some first subfloders level.
</p>
<a name="Analyze_of_hierarchical_structure"></a><h4> <span class="mw-headline"> Analyze of hierarchical structure </span></h4>
<table border="1">
<tr>
<th style="width:20%">
</th><th style="width:40%"> Advantages
</th><th style="width:40%"> Disadvantages
</th></tr>
<tr>
<th> Configurable Tree
</th><th>
<ul><li> configurable structure; splits node only when required
</li><li> less memory consumption
</li><li> better structure control
</li></ul>
</th><th>
<ul><li> mapping between hashed ID and persistence path needs to be stored
</li><li> possibility of assync. situations between the existing storage persistence and stored mapping (in case of some external factors alters the persistence storage)
</li><li> implementation effort
</li></ul>
</th></tr>
<tr>
<th> Deterministically Calculation
</th><th>
<ul><li> deterministically calculation -&gt; no mapping needs to be stored (hashed ID - stored path)
</li><li> less implementation effort (almost done)
</li></ul>
</th><th>
<ul><li> less control of the hierarchic structure
</li><li> nodes gets split depending on the matching coincidence between the first string part of the hashed IDs that is used by the deterministically calculation
</li><li> memory consumption and faster risk of OutOfMemory occurrence (the file system APIs creates listeners for all these sub-folders in order to provide cache (refresh) functionality, so for single record there will be 5 listeners (4 sub-folders + 1 record) created and memory consumption increases significantly)
</li></ul>
</th></tr>
</table>
<a name="II._Distributed_file_system_.28SFTP.2C_FTP.29"></a><h3> <span class="mw-headline"> II. Distributed file system (SFTP, FTP) </span></h3>
<p>The purpose of distributed file system option is to allow storing/accessing of binary data into network storage devices transparently through SFTP, FTP. User needs to provide configuration data related to distributed systems (host, user, password). It is considered that user has write access to the distributed system at the configured persistence location path.
</p>
<a name="1._Flat_structure_2"></a><h4> <span class="mw-headline"> 1. Flat structure </span></h4>
<p>It has the same characteristics like in the local flat configuration, but it is applied on the persistence location from the distributed system.
</p>
<a name="2._Hierarchical_structure_.28configurable_tree.29_2"></a><h4> <span class="mw-headline"> 2. Hierarchical structure (configurable tree) </span></h4>
<p>It has the same characteristics like in the local hierarchic (configurable tree) configuration, but it is applied on the persistence location from the distributed system.
</p>
<a name="3._Hierarchical_structure_.28deterministically_calculation.29_2"></a><h4> <span class="mw-headline"> 3. Hierarchical structure (deterministically calculation) </span></h4>
<p>It has the same characteristics like in the local hierarchic (deterministically calculation) configuration, but it is applied on the persistence location from the distributed system.
</p>
<a name="B._RDBMS"></a><h3> <span class="mw-headline"> B. RDBMS </span></h3>
<p>Binary Storage Service shall also be able to store the records (blob) into RDBMS. Url connection-string shall be configured (driver, host, database name, port, user, password).
</p><p>For performance considerations, database schema shall contain multiple tables (since large BLOBs will be stored). Binary Storage Service shall deterministically distribute records to database tables.
</p>
<a name="C._Object_DataBase"></a><h3> <span class="mw-headline"> C. Object DataBase </span></h3>
<p>Binary Storage Service will use existing Open Source Object Database Engine to store the binary data. It is not Binary Storage Service responsibility to directly access the stored data; the service will store/fetch the data by using the exposed API.
</p><p>Open Source Database Engines&nbsp;:
</p>
<ul><li> db4o - <a href="http://www.db4objects.com" class="external free" title="http://www.db4objects.com" rel="nofollow">http://www.db4objects.com</a> - GNU General Public License (GPL)
</li><li> NeoDatis ODB - <a href="http://www.neodatis.org/" class="external free" title="http://www.neodatis.org/" rel="nofollow">http://www.neodatis.org/</a> - GNU General Public License (GPL)
</li><li> Perst - <a href="http://www.mcobject.com/perst/" class="external free" title="http://www.mcobject.com/perst/" rel="nofollow">http://www.mcobject.com/perst/</a> - GNU General Public License (GPL)
</li><li> Neo4j - <a href="http://www.neo4j.org" class="external free" title="http://www.neo4j.org" rel="nofollow">http://www.neo4j.org</a> - GNU General Public License (GPL)
</li><li> JODB - <a href="http://www.java-objects-database.com" class="external free" title="http://www.java-objects-database.com" rel="nofollow">http://www.java-objects-database.com</a> - GNU General Public License (GPL)
</li></ul>
<ul><li> Oracle Berkeley DB
</li><li> Berkeley DB Java Edition
</li></ul>
<a name="Cluster_configuration"></a><h2> <span class="mw-headline"> Cluster configuration </span></h2>
<p>Binary Storage Service must offer fallowing cluster configurations:
</p>
<ul><li> Client components clustering (like blackboard service) - where the client services run in cluster and all the cluster nodes needs to share the same data (which means, all the nodes have to share the same binary persistence storage). This will be only possible by configuring the Binary Storage Service to use the distributed file system option or object database option (where the Object Database Engine is capable to be remotely accessed - not an embedded designed database which does not allow directly remote connections);
</li><li> Persistence storage clustering - where binary data will be stored in more than one nodes.
</li></ul>
<p>The two cluster options shall be available even configuring both at the same time, or only one, or non of them.
</p><p>Both options must be supported by the frameworks / RDBMS that Binary Storage Service will use.
</p>
<a name="Concurrent_access"></a><h2> <span class="mw-headline"> Concurrent access </span></h2>
<p>Binary Storage Service shall allow multiple clients accessing (read/write) the storage. It is Binary Storage Service responsibilities to synchronize the operation in order to avoid deadlocks.
</p>
<a name="Technical_aspects_for_designing_the_Binary_Storage_Service"></a><h2> <span class="mw-headline"> Technical aspects for designing the Binary Storage Service </span></h2>
<ul><li> Binary data compressing and encryption shall be available via configuration
</li><li> Binary storage shall internally manage its persistence hierarchy.
</li><li> The binary service shall be designed as a single bundle / service.
</li><li> Exception handling mechanism should treat all internal binary storage (logical and unexpected) errors and wrap the exceptions into a “binary storage exception” that makes sense for the Blackboard service
</li><li> Resources synchronization shall be done at the lowest possible level
</li><li> Binary Storage shall manage its configuration internally (highly couple classes are difficult to maintain and hard to understand in isolation – they tend to introduce internal dependencies). Decouple binary storage configuration from blackboard service
</li></ul>
<p><a href="http://wiki.eclipse.org/Image:2.Sequence_Diagram_NewBinaryStorae.jpg" class="image" title="Image:2.Sequence Diagram NewBinaryStorae.jpg"><img alt="Image:2.Sequence Diagram NewBinaryStorae.jpg" src="http://wiki.eclipse.org/images/c/c2/2.Sequence_Diagram_NewBinaryStorae.jpg" width="652" height="300" border="0" /></a>
</p>
<ul><li> The Binary Storage Service API shall stay as simple as possible
</li></ul>
<div dir="ltr" style="text-align: left;"><pre class="source-java"><span class="kw4">void</span> store<span class="br0">&#40;</span><span class="kw3">String</span> id, <span class="kw3">InputStream</span> stream<span class="br0">&#41;</span>;
<span class="kw4">void</span> store<span class="br0">&#40;</span><span class="kw3">String</span> id, <span class="kw4">byte</span><span class="br0">&#91;</span><span class="br0">&#93;</span> blob<span class="br0">&#41;</span>
<span class="kw4">byte</span><span class="br0">&#91;</span><span class="br0">&#93;</span> fetchAsByte<span class="br0">&#40;</span><span class="kw3">String</span> id<span class="br0">&#41;</span>
<span class="kw3">InputStream</span> fetchAsStream<span class="br0">&#40;</span><span class="kw3">String</span> id<span class="br0">&#41;</span>
<span class="kw4">void</span> remove<span class="br0">&#40;</span><span class="kw3">String</span> id<span class="br0">&#41;</span>
<span class="kw4">int</span> fetchSize<span class="br0">&#40;</span><span class="kw3">String</span> id<span class="br0">&#41;</span></pre></div>
<a name="UML_Class_Diagram"></a><h2> <span class="mw-headline"> UML Class Diagram </span></h2>
<p><a href="http://wiki.eclipse.org/Image:SMILA-BinaryStorage-ClassDiagram.jpg" class="image" title="SMILA-BinaryStorage-ClassDiagram.jpg"><img alt="" src="http://wiki.eclipse.org/images/thumb/3/3d/SMILA-BinaryStorage-ClassDiagram.jpg/1024px-SMILA-BinaryStorage-ClassDiagram.jpg" width="1024" height="790" border="0" /></a>
</p>
<a name="Test_Results"></a><h2> <span class="mw-headline"> Test Results </span></h2>
<p>Following link contains results of tests based on different implementations (simple java.io and EFS).
</p><p><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=254852" class="external free" title="https://bugs.eclipse.org/bugs/show_bug.cgi?id=254852" rel="nofollow">https://bugs.eclipse.org/bugs/show_bug.cgi?id=254852</a>
</p>
<!--
NewPP limit report
Preprocessor node count: 25/1000000
Post-expand include size: 0/2097152 bytes
Template argument size: 0/2097152 bytes
#ifexist count: 0/100
-->
<!-- Saved in parser cache with key wikidb:pcache:idhash:16278-0!1!0!!en!2!edit=0 and timestamp 20120203060935 -->
<div class="printfooter">
Retrieved from "<a href="Binary_Storage.html">http://wiki.eclipse.org/SMILA/Project_Concepts/Binary_Storage</a>"</div>
<div id="catlinks"><p class='catlinks'><a href="http://wiki.eclipse.org/Special:Categories" title="Special:Categories">Category</a>: <span dir='ltr'><a href="http://wiki.eclipse.org/Category:SMILA" title="Category:SMILA">SMILA</a></span></p></div> <!-- end content -->
<div class="visualClear"></div>
</div>
</div>
</div>
<!-- Yoink of toolbox for phoenix moved up -->
</div>
</div>
<div id="clearFooter"/>
<div id="footer" >
<ul id="footernav">
<li class="first"><a href="http://www.eclipse.org/">Home</a></li>
<li><a href="http://www.eclipse.org/legal/privacy.php">Privacy Policy</a></li>
<li><a href="http://www.eclipse.org/legal/termsofuse.php">Terms of Use</a></li>
<li><a href="http://www.eclipse.org/legal/copyright.php">Copyright Agent</a></li>
<li><a href="http://www.eclipse.org/org/foundation/contact.php">Contact</a></li>
<li><a href="http://wiki.eclipse.org/Eclipsepedia:About" title="Eclipsepedia:About">About Eclipsepedia</a></li>
</ul>
<span id="copyright">Copyright &copy; 2012 The Eclipse Foundation. All Rights Reserved</span>
<p id="footercredit">This page was last modified 09:04, 18 November 2008 by <a href="http://wiki.eclipse.org/index.php?title=User:Marius.cimpean.numerica.de&amp;action=edit" class="new" title="User:Marius.cimpean.numerica.de">Marius Cimpean</a>. Based on work by <a href="http://wiki.eclipse.org/User:T.menzel.brox.de" title="User:T.menzel.brox.de">thomas menzel</a>.</p>
<p id="footerviews">This page has been accessed 4,453 times.</p>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-910670-4");
pageTracker._trackPageview();
</script>
<!-- <div class="visualClear"></div> -->
<script type="text/javascript">if (window.runOnloadHook) runOnloadHook();</script>
</div>
<!-- Served in 0.069 secs. --></body></html>