directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r888002 - in /websites/staging/directory/trunk/content: ./ mavibot/user-guide/ mavibot/user-guide/images/
Date Mon, 25 Nov 2013 09:41:59 GMT
Author: buildbot
Date: Mon Nov 25 09:41:58 2013
New Revision: 888002

Log:
Staging update by buildbot for directory

Added:
    websites/staging/directory/trunk/content/mavibot/user-guide/7.3-serializations.html
    websites/staging/directory/trunk/content/mavibot/user-guide/images/ug-btree-has-prev.graphml
  (with props)
    websites/staging/directory/trunk/content/mavibot/user-guide/images/ug-btree-has-prev.png
  (with props)
Modified:
    websites/staging/directory/trunk/content/   (props changed)
    websites/staging/directory/trunk/content/mavibot/user-guide/7.2-physical-storage.html

Propchange: websites/staging/directory/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Mon Nov 25 09:41:58 2013
@@ -1 +1 @@
-1545025
+1545189

Modified: websites/staging/directory/trunk/content/mavibot/user-guide/7.2-physical-storage.html
==============================================================================
--- websites/staging/directory/trunk/content/mavibot/user-guide/7.2-physical-storage.html
(original)
+++ websites/staging/directory/trunk/content/mavibot/user-guide/7.2-physical-storage.html
Mon Nov 25 09:41:58 2013
@@ -133,13 +133,13 @@
         </div>
         <div class="nav_up">
         
-            <a href="../user-guide.html">User Guide</a>
+            <a href="7-btree-internals.html">7 - Mavibot Internals</a>
 		
         </div>
         <div class="nav_next">
         
-			&nbsp;
-        
+            <a href="7.3-serializations.html">7.3 - Serializations</a>
+		
         </div>
         <div class="clearfix"></div>
     </div>
@@ -225,8 +225,6 @@ it's something we might want to change l
 <p>(The <em>Node</em> is not described, as it's basically the same data
structure, but with one extra value).</p>
 <p>It does not need more space to serialize the data this way, as the offsets are ints,
and in the previous version, those ints are used to store the length of the keys and values
anyway.</p>
 <p>The gain is that we can have access to a given key and value without having to read
all the previous keys and values. Also we can now read a leaf or a node without having to
deserialize all the keys and values they contain.</p>
-<h2 id="page-serialization">Page serialization</h2>
-<p>We serialize <em>Node</em> and <em>Leaf</em> differently
on disk, as seen in a previois paragraph.</p>
 
 
     <div class="nav">
@@ -237,13 +235,13 @@ it's something we might want to change l
         </div>
         <div class="nav_up">
         
-            <a href="../user-guide.html">User Guide</a>
+            <a href="7-btree-internals.html">7 - Mavibot Internals</a>
 		
         </div>
         <div class="nav_next">
         
-			&nbsp;
-        
+            <a href="7.3-serializations.html">7.3 - Serializations</a>
+		
         </div>
         <div class="clearfix"></div>
     </div>

Added: websites/staging/directory/trunk/content/mavibot/user-guide/7.3-serializations.html
==============================================================================
--- websites/staging/directory/trunk/content/mavibot/user-guide/7.3-serializations.html (added)
+++ websites/staging/directory/trunk/content/mavibot/user-guide/7.3-serializations.html Mon
Nov 25 09:41:58 2013
@@ -0,0 +1,221 @@
+<!DOCTYPE html>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<html>
+	<head>
+		<title>7.3 - Serializations &mdash; Apache Directory</title>
+		
+	    <link href="./../../css/common.css" rel="stylesheet" type="text/css">
+	    <link href="./../../css/turquoise.css" rel="stylesheet" type="text/css">
+    
+        
+        <link rel="shortcut icon" href="./../../images/mavibot-icon_16x16.png">
+    
+        <!-- Google Analytics -->
+        <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
+        <script type="text/javascript">
+            _uacct = "UA-1358462-1";
+            urchinTracker();
+        </script>
+	</head>
+	<body>
+	    <div id="container">
+            <div id="header">
+                <div id="subProjectsNavBar">
+                    <a href="./../../">
+                        
+                        Apache Directory Project
+                        
+                    </a>
+                    &nbsp;|&nbsp;
+                    <a href="./../../apacheds">
+                        
+                        ApacheDS
+                        
+                    </a>
+                    &nbsp;|&nbsp;
+                    <a href="./../../studio">
+                        
+                        Apache Directory Studio
+                        
+                    </a>
+                    &nbsp;|&nbsp;
+                    <a href="./../../api">
+                        
+                        Apache LDAP API
+                        
+                    </a>
+                    &nbsp;|&nbsp;
+                    <a href="./../../mavibot">
+                        
+                        <STRONG>Mavibot</STRONG>
+                        
+                    </a>
+                </div><!-- subProjectsNavBar -->
+            </div><!-- header -->
+            <div id="content">
+                <div id="leftColumn">
+                    
+<div id="navigation">
+    
+    <h5>Mavibot 1.0</h5>
+    <ul>
+        <li><a href="./../../mavibot/">Home</a></li>
+        <li><a href="./../../mavibot/news.html">News</a></li>
+    </ul>
+    <h5>Downloads</h5>
+    <ul>
+	    <li><a href="./../../mavibot/downloads.html">Version 1.0.0-M2</a>&nbsp;&nbsp;<IMG
src="./../../images/new_badge.gif" alt="" style="margin-bottom:-3px;" border="0"></li>
+        <li><a href="./../../mavibot/download-old-versions.html">Older versions</a></li>
+    </ul>
+    <h5>Getting Started</h5>
+    <ul>
+        <li><a href="./../../mavibot/vision.html">Vision</a></li>
+    </ul>
+    <h5>Documentation</h5>
+    <ul>
+        <li><a href="./../../mavibot/five-minutes-tutorial.html">Five minutes
tutorial</a></li>
+	<li><a href="./../../mavibot/user-guide.html">User Guide</a></li>
+        <li><a href="./../../mavibot/gen-docs/latest/apidocs/">JavaDocs</a></li>
+        <!--li><a href="./../../mavibot/gen-docs/latest/">Generated Reports</a></li-->
+        <li><a href="./../../mavibot/developer-guide.html">Developer Guide</a></li>
+    </ul>
+    
+    
+    <h5>Support</h5>
+    <ul>
+        <li><a href="./../../mailing-lists-and-irc.html">Mailing Lists &amp;
IRC</a></li>
+        <li><a href="./../../sources.html">Sources</a></li>
+        <li><a href="./../../issue-tracking.html">Issue Tracking</a></li>
+        <li><a href="./../../commercial-support.html">Commercial Support</a></li>
+    </ul>
+    <h5>Community</h5>
+    <ul>
+        <li><a href="./../../contribute.html">How to Contribute</a></li>
+        <li><a href="./../../team.html">Team</a></li>
+        <li><a href="./../../original-project-proposal.html">Original Project
Proposal</a></li>
+        <li><a href="./../../special-thanks.html" class="external-link" rel="nofollow">Special
Thanks</a></li>
+    </ul>
+    <h5>About Apache</h5>
+    <ul>
+        <li><a href="http://www.apache.org/">Apache</a></li>
+        <li><a href="http://www.apache.org/licenses/">License</a></li>
+        <li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
+        <li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+        <li><a href="http://www.apache.org/security/">Security</a></li>
+    </ul>
+    
+</div><!-- navigation -->
+
+                </div><!-- leftColumn -->
+                <div id="rightColumn">
+
+
+    <div class="nav">
+        <div class="nav_prev">
+        
+            <a href="7.2-physical-storage.html">7.2 - Physical storage</a>
+		
+        </div>
+        <div class="nav_up">
+        
+            <a href="7-btree-internals.html">7 - Mavibot Internals</a>
+		
+        </div>
+        <div class="nav_next">
+        
+			&nbsp;
+        
+        </div>
+        <div class="clearfix"></div>
+    </div>
+
+
+<h1 id="73-serializations">7.3 - Serializations</h1>
+<p>The logical pages are serialized before being stored on physical pages. This is
a process that should obviously be reversible. W will describe in this chapter how we serialize
<strong>Leaf</strong> and <strong>Node</strong>.</p>
+<h2 id="leaf-serialization">Leaf serialization</h2>
+<p>A <strong>Leaf</strong> contains some medata data, and a set of keys
and values. A key can have many values, and we have as many keys as values. That being said,
let's describe the internal format of a serialized leaf :</p>
+<pre>
+    +----------------------------------+
+    | revision (long)                  | 8 bytes
+    +----------------------------------+
+    | nbElems (int)                    | 4 bytes
+    +----------------------------------+
+    | dataSize (int)                   | 4 bytes = sum[0..nbElems]( valueLength, keyLength
) + 8 x nbElems
+    +----------------------------------+
+    | +------------------------------+ |
+    | | valueLength[0] (int)         | | 4 bytes \
+    | +------------------------------+ |           > n+4 bytes
+    | | value[0] (byte[])            | | n bytes /
+    | +------------------------------+ |
+    | | keyLength[0] (int)           | | 4 bytes \
+    | +------------------------------+ |           > n+4 bytes
+    | | key[0] (byte[])              | | n bytes /
+    | +------------------------------+ |
+    ...                              ...
+    | +------------------------------+ |
+    | | valueLength[nbElems-1] (int) | | 4 bytes \
+    | +------------------------------+ |           > n+4 bytes
+    | | value[nbElems-1] (byte[])    | | n bytes /
+    | +------------------------------+ |
+    | | keyLength[nbElems-1] (int)   | | 4 bytes \
+    | +------------------------------+ |           > n+4 bytes
+    | | key[nbElems-1] (byte[])      | | n bytes /
+    | +------------------------------+ |
+    +----------------------------------+
+
+</pre>
+
+<p>We keep the length of each serialized key and value just because we need to provide
a complete byte[] to the key or value deserializer (ie, the exact number of bytes needed to
be able to deserialize the key or the value).</p>
+<p>The <em>dataSize</em> value is used so that we can know how many bytes
we will have to read - thus the number of physical pages to read - in order to get a full
page.</p>
+<h2 id="leaf-deserialization">Leaf deserialization</h2>
+<p>On the other way, when we deserialize a leaf, we won't deserialize the keys and
the values (it would be too expensive, if the leaf is discarded from memory immediately, when
we only need to read one single key and value). We thus keep the byte[] form of each keys
and each values, which will be deserialized on demand.</p>
+<p>We use two data structures to store a key and a value :
+<em> a <em>KeyHolder</em> for the key</em> a <em>ValueHolder</em>
for the value</p>
+<h3 id="keyholder">KeyHolder</h3>
+<h3 id="valueholder">ValueHolder</h3>
+
+
+    <div class="nav">
+        <div class="nav_prev">
+        
+            <a href="7.2-physical-storage.html">7.2 - Physical storage</a>
+		
+        </div>
+        <div class="nav_up">
+        
+            <a href="7-btree-internals.html">7 - Mavibot Internals</a>
+		
+        </div>
+        <div class="nav_next">
+        
+			&nbsp;
+        
+        </div>
+        <div class="clearfix"></div>
+    </div>
+
+
+                </div><!-- rightColumn -->
+                <div id="endContent"></div>
+            </div><!-- content -->
+            <div id="footer">&copy; 2003-2012, <a href="http://www.apache.org">The
Apache Software Foundation</a> - <a href="./../../privacy-policy.html">Privacy
Policy</a><br />
+                Apache Directory, ApacheDS, Apache Directory Server, Apache Directory Studio,
Apache LDAP API, Apache Triplesec, Triplesec, Apache Mavibot, Mavibot, Apache, the Apache
feather logo, and the Apache Directory project logos are trademarks of The Apache Software
Foundation.
+            </div>
+        </div><!-- container -->
+    </body>
+</html>

Added: websites/staging/directory/trunk/content/mavibot/user-guide/images/ug-btree-has-prev.graphml
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/directory/trunk/content/mavibot/user-guide/images/ug-btree-has-prev.graphml
------------------------------------------------------------------------------
    svn:mime-type = application/xml

Added: websites/staging/directory/trunk/content/mavibot/user-guide/images/ug-btree-has-prev.png
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/directory/trunk/content/mavibot/user-guide/images/ug-btree-has-prev.png
------------------------------------------------------------------------------
    svn:mime-type = image/png



Mime
View raw message