Browse Source

Merged documents

Frederic G. MARAND 6 years ago
parent
commit
ca48de6e2c
6 changed files with 170 additions and 100 deletions
  1. 8 8
      .idea/libraries/GOPATH__gache_.xml
  2. 98 25
      .idea/workspace.xml
  3. 0 31
      doc/components.md
  4. 1 36
      docs/README.md
  5. 53 0
      docs/components.md
  6. 10 0
      docs/memory.md

+ 8 - 8
.idea/libraries/GOPATH__gache_.xml

@@ -1,22 +1,22 @@
 <component name="libraryTable">
   <library name="GOPATH &lt;gache&gt;">
     <CLASSES>
-      <root url="file://$PROJECT_DIR$/../../../launchpad.net" />
-      <root url="file://$PROJECT_DIR$/../../../golang.org" />
       <root url="file://$PROJECT_DIR$/../../../.idea" />
-      <root url="file://$PROJECT_DIR$/../../../github.com" />
-      <root url="file://$PROJECT_DIR$/../../../gopkg.in" />
       <root url="file://$PROJECT_DIR$/../.." />
+      <root url="file://$PROJECT_DIR$/../../../gopkg.in" />
+      <root url="file://$PROJECT_DIR$/../../../github.com" />
+      <root url="file://$PROJECT_DIR$/../../../golang.org" />
+      <root url="file://$PROJECT_DIR$/../../../launchpad.net" />
       <root url="file://$PROJECT_DIR$/../../../fgm" />
     </CLASSES>
     <JAVADOC />
     <SOURCES>
-      <root url="file://$PROJECT_DIR$/../../../launchpad.net" />
-      <root url="file://$PROJECT_DIR$/../../../golang.org" />
       <root url="file://$PROJECT_DIR$/../../../.idea" />
-      <root url="file://$PROJECT_DIR$/../../../github.com" />
-      <root url="file://$PROJECT_DIR$/../../../gopkg.in" />
       <root url="file://$PROJECT_DIR$/../.." />
+      <root url="file://$PROJECT_DIR$/../../../gopkg.in" />
+      <root url="file://$PROJECT_DIR$/../../../github.com" />
+      <root url="file://$PROJECT_DIR$/../../../golang.org" />
+      <root url="file://$PROJECT_DIR$/../../../launchpad.net" />
       <root url="file://$PROJECT_DIR$/../../../fgm" />
     </SOURCES>
     <excluded>

+ 98 - 25
.idea/workspace.xml

@@ -2,11 +2,10 @@
 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="36eaad7a-0726-4217-b7e5-1b2c680697a1" name="Default" comment="">
-      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/markdown-exported-files.xml" />
-      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/docs/README.md" />
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/compiler.xml" afterPath="$PROJECT_DIR$/.idea/compiler.xml" />
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/docs/memory.md" />
+      <change type="MOVED" beforePath="$PROJECT_DIR$/doc/components.md" afterPath="$PROJECT_DIR$/docs/components.md" />
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/libraries/GOPATH__gache_.xml" afterPath="$PROJECT_DIR$/.idea/libraries/GOPATH__gache_.xml" />
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/docs/README.md" afterPath="$PROJECT_DIR$/docs/README.md" />
     </list>
     <ignored path="gache.iws" />
     <ignored path=".idea/workspace.xml" />
@@ -47,13 +46,16 @@
       <list>
         <option value="$PROJECT_DIR$/hello.go" />
         <option value="$PROJECT_DIR$/doc/components.md" />
+        <option value="$PROJECT_DIR$/docs/components.md" />
+        <option value="$PROJECT_DIR$/docs/README.md" />
+        <option value="$PROJECT_DIR$/docs/memory.md" />
       </list>
     </option>
   </component>
   <component name="ProjectFrameBounds">
     <option name="y" value="23" />
-    <option name="width" value="1676" />
-    <option name="height" value="1027" />
+    <option name="width" value="1436" />
+    <option name="height" value="877" />
   </component>
   <component name="ProjectInspectionProfilesVisibleTreeState">
     <entry key="Project Default">
@@ -108,7 +110,6 @@
       <foldersAlwaysOnTop value="true" />
     </navigator>
     <panes>
-      <pane id="PackagesPane" />
       <pane id="Scope">
         <subPane subId="Project Files">
           <PATH>
@@ -123,9 +124,6 @@
           </PATH>
         </subPane>
       </pane>
-      <pane id="AndroidView">
-        <subPane />
-      </pane>
       <pane id="ProjectPane">
         <subPane>
           <PATH>
@@ -154,13 +152,17 @@
               <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
             </PATH_ELEMENT>
             <PATH_ELEMENT>
-              <option name="myItemId" value="doc" />
+              <option name="myItemId" value="docs" />
               <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
             </PATH_ELEMENT>
           </PATH>
         </subPane>
       </pane>
+      <pane id="PackagesPane" />
       <pane id="Scratches" />
+      <pane id="AndroidView">
+        <subPane />
+      </pane>
     </panes>
   </component>
   <component name="PropertiesComponent">
@@ -183,6 +185,11 @@
     <property name="project.structure.side.proportion" value="0.0" />
     <property name="DefaultGoTemplateProperty" value="Go Application" />
   </component>
+  <component name="RecentsManager">
+    <key name="MoveFile.RECENT_KEYS">
+      <recent name="$PROJECT_DIR$/docs" />
+    </key>
+  </component>
   <component name="RunManager" selected="Go Single File.go run hello.go">
     <configuration default="false" name="go run hello.go" type="GoRunFileConfiguration" factoryName="Go Single File" temporary="true">
       <module name="gache" />
@@ -535,22 +542,22 @@
     <servers />
   </component>
   <component name="ToolWindowManager">
-    <frame x="0" y="23" width="1676" height="1027" extended-state="6" />
+    <frame x="0" y="23" width="1436" height="877" extended-state="6" />
     <editor active="false" />
     <layout>
       <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
       <window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
       <window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
       <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32939914" sideWeight="0.5" order="0" side_tool="true" content_ui="tabs" />
-      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32938075" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
       <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
+      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32938075" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
       <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
       <window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
-      <window_info id="Project" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.25954655" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
-      <window_info id="Structure" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.24940334" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
+      <window_info id="Project" active="true" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.26327115" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
+      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.13988522" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
       <window_info id="Theme Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
-      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
       <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
+      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
       <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
       <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
       <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
@@ -612,7 +619,7 @@
     <watches-manager />
   </component>
   <component name="editorHistoryManager">
-    <entry file="file://$PROJECT_DIR$/doc/components.md">
+    <entry file="file://$PROJECT_DIR$/docs/components.md">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="0">
           <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
@@ -628,25 +635,91 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/doc/components.md">
+    <entry file="file://$PROJECT_DIR$/README.md">
+      <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
+        <state split_layout="SPLIT">
+          <first_editor relative-caret-position="30">
+            <caret line="2" column="22" selection-start-line="2" selection-start-column="22" selection-end-line="2" selection-end-column="22" />
+            <folding />
+          </first_editor>
+          <second_editor />
+        </state>
+      </provider>
+      <provider editor-type-id="split-provider[text-editor;MarkdownPreviewEditor]">
+        <state split_layout="SPLIT">
+          <first_editor relative-caret-position="0">
+            <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+            <folding />
+          </first_editor>
+          <second_editor>
+            <js_state />
+          </second_editor>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/docs/README.md">
+      <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
+        <state split_layout="FIRST">
+          <first_editor relative-caret-position="285">
+            <caret line="19" column="0" selection-start-line="19" selection-start-column="0" selection-end-line="19" selection-end-column="0" />
+            <folding />
+          </first_editor>
+          <second_editor />
+        </state>
+      </provider>
+      <provider editor-type-id="split-provider[text-editor;MarkdownPreviewEditor]">
+        <state split_layout="SPLIT">
+          <first_editor relative-caret-position="0">
+            <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+            <folding />
+          </first_editor>
+          <second_editor>
+            <js_state />
+          </second_editor>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/docs/components.md">
+      <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
+        <state split_layout="FIRST">
+          <first_editor relative-caret-position="0">
+            <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+            <folding />
+          </first_editor>
+          <second_editor />
+        </state>
+      </provider>
+      <provider editor-type-id="split-provider[text-editor;MarkdownPreviewEditor]">
+        <state split_layout="SPLIT">
+          <first_editor relative-caret-position="452">
+            <caret line="45" column="0" selection-start-line="45" selection-start-column="0" selection-end-line="45" selection-end-column="0" />
+            <folding />
+          </first_editor>
+          <second_editor>
+            <js_state />
+          </second_editor>
+        </state>
+      </provider>
       <provider editor-type-id="text-editor">
         <state relative-caret-position="180">
           <caret line="12" column="77" selection-start-line="12" selection-start-column="77" selection-end-line="12" selection-end-column="77" />
         </state>
       </provider>
-      <provider editor-type-id="split-provider[text-editor;markdown-preview-editor]">
-        <state split_layout="SPLIT">
-          <first_editor relative-caret-position="435">
-            <caret line="29" column="17" selection-start-line="29" selection-start-column="17" selection-end-line="29" selection-end-column="17" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/docs/memory.md">
+      <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
+        <state split_layout="FIRST">
+          <first_editor relative-caret-position="150">
+            <caret line="10" column="0" selection-start-line="10" selection-start-column="0" selection-end-line="10" selection-end-column="0" />
             <folding />
           </first_editor>
           <second_editor />
         </state>
       </provider>
-      <provider selected="true" editor-type-id="split-provider[text-editor;MarkdownPreviewEditor]">
+      <provider editor-type-id="split-provider[text-editor;MarkdownPreviewEditor]">
         <state split_layout="SPLIT">
-          <first_editor relative-caret-position="345">
-            <caret line="23" column="0" selection-start-line="23" selection-start-column="0" selection-end-line="23" selection-end-column="0" />
+          <first_editor relative-caret-position="0">
+            <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
             <folding />
           </first_editor>
           <second_editor>

+ 0 - 31
doc/components.md

@@ -1,31 +0,0 @@
-# Gache components
-## Server
-
-### Event handling: builtin
-
-From http://nginx.org/en/docs/events.html
-
-| Method | Linux | macOS | Windows | BSD | Solaris, HP-UX, IRIX, Tru64 | Notes |
-|--------|:-----:|:-----:|:-------:|:---:|:---------------------------:|:------|
-| select | X     | X     | X       | X   | X                           | Least efficient, but widest support  |
-| poll   | X     | X     |         | X   | X                           | Low efficiency, but wide support     |
-| kqueue |       | X, Go |         | X   | Go                          | Efficient |
-| epoll  | Go    |       |         |     |                             | Efficient |
-| /dev/poll |    |       |         |     | X                           | Efficient |
-| eventport |    |       |         |     | Solaris 10+, Go             | Known problems, use /dev/poll instead |
-| IOCP   |       |       | X, Go   |     |                             | Recommended for Windows |
-
-Goland runtime uses `epoll`/`kqueue`/IOCP so no need for `libevent` or similar.
-
-@see https://golang.org/search?q=netpoll#Global
-
-
-### Readline
-
-* Emulated by https://github.com/chzyer/readline
-* "Video" on: https://asciinema.org/a/32oseof9mkilg7t7d4780qt4m
-* Demo source: https://github.com/chzyer/readline/blob/master/example/readline-demo/readline-demo.go
-
-
-## Client library
-

+ 1 - 36
docs/README.md

@@ -16,39 +16,4 @@ Like Memcached, plus...
   * Write-back/write-through replication
   * Chained storage (fast → slow)
 
-But probably slower overall, just more convenient.
-
-## Components
-
-* Protocol handling (FSMs)
-  * Application: Memcache protocol proper
-  * Presentation: ASCII / Binary
-  * Transport:
-    * TCP with persistent connections
-    * TCP without persistent connections
-    * UDP
-    * raw socketpair (stdin/stdout)
-* Readline equivalence for ASCII presentation interactions
-* Storage
-  * Pluggable storage
-    * Journaling
-  * Storage engines
-    * Memory
-    * Memcached, for use as a debugging proxy in front of a standard instance
-    * Others ?
-  * Memory
-      * Main memory allocation
-      * Slab allocator
-  * Reporting
-  * Background expiration lurker
-
-## Memory allocation
-
-### Memcache slabs model
-
-* http://www.mikeperham.com/2009/06/22/slabs-pages-chunks-and-memcached/ (2009)
-  * Older versions of memcached used slabs sized based on powers of two, so you'd have a 1KB slab, 2KB slab, 4KB slab, ..., all the way to 1MB.
-  * Newer (2006: 1.2.0-RC1 ?) versions use 1.25^n for the chunk size
-* Allocate slabs for elements of a given size range ("chunks")
-* Slabs are made of fixed-size (1MB) pages, split according to the chunk size
-* Slab chunk sizes are in a geometric progression: (1 + x)^n 
+But probably slower overall, but more convenient.

+ 53 - 0
docs/components.md

@@ -0,0 +1,53 @@
+# Gache components
+## Server
+
+* Protocol handling (FSMs)
+  * Application: Memcache protocol proper
+  * Presentation: ASCII / Binary
+  * Transport "connection":
+    * TCP with persistent connections
+    * TCP without persistent connections
+    * UDP
+    * raw socketpair (stdin/stdout)
+  * Event handling
+* Readline equivalence for ASCII presentation interactions
+* Storage
+  * Pluggable storage
+    * Journaling
+  * Storage engines
+    * Memory
+    * Memcached, for use as a debugging proxy in front of a standard instance
+    * Others ?
+  * Memory
+      * Main memory allocation
+      * Slab allocator
+  * Reporting
+  * Background expiration lurker
+
+### Event handling: builtin
+
+From http://nginx.org/en/docs/events.html
+
+| Method    | Linux | macOS | Windows | BSD | UNIX            | Notes                            |
+|-----------|:-----:|:-----:|:-------:|:---:|:---------------:|:---------------------------------|
+| select    | X     | X     | X       | X   | X               | Least efficient, widest support  |
+| poll      | X     | X     |         | X   | X               | Low efficiency, wide support     |
+| kqueue    |       | X, Go |         | X   | Go              | Efficient                        |
+| epoll     | Go    |       |         |     |                 | Efficient                        |
+| /dev/poll |       |       |         |     | X               | Efficient                        |
+| eventport |       |       |         |     | Solaris 10+, Go | Problems, use /dev/poll instead  |
+| IOCP      |       |       | X, Go   |     |                 | Recommended for Windows          |
+
+* UNIX: Solaris, HP-UX, IRIX, Tru64
+* Golang runtime uses `epoll`/`kqueue`/IOCP so no need for `libevent` or similar.
+* See https://golang.org/search?q=netpoll#Global
+
+### Readline
+
+* Emulated by https://github.com/chzyer/readline
+* "Video" on: https://asciinema.org/a/32oseof9mkilg7t7d4780qt4m
+* Demo source: https://github.com/chzyer/readline/blob/master/example/readline-demo/readline-demo.go
+
+
+## Client library
+

+ 10 - 0
docs/memory.md

@@ -0,0 +1,10 @@
+# Memory allocation
+
+## Memcache slabs model
+
+* http://www.mikeperham.com/2009/06/22/slabs-pages-chunks-and-memcached/ (2009)
+  * Older versions of memcached used slabs sized based on powers of two, so you'd have a 1KB slab, 2KB slab, 4KB slab, ..., all the way to 1MB.
+  * Newer (2006: 1.2.0-RC1 ?) versions use 1.25^n for the chunk size
+* Allocate slabs for elements of a given size range ("chunks")
+* Slabs are made of fixed-size (1MB) pages, split according to the chunk size
+* Slab chunk sizes are in a geometric progression: (1 + x)^n