61425c80c7d30e802e77b0def090afd2dcfb8610
[sixth-data.git] / doc / index.org
1 #+TITLE: Sixth Data - Data storage and computing engine
2
3 * (document settings) :noexport:
4 ** use dark style for TWBS-HTML exporter
5 #+HTML_HEAD: <link href="https://bootswatch.com/3/darkly/bootstrap.min.css" rel="stylesheet">
6 #+HTML_HEAD: <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
7 #+HTML_HEAD: <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/js/bootstrap.min.js"></script>
8 #+HTML_HEAD: <style type="text/css">
9 #+HTML_HEAD:   footer {background-color: #111 !important;}
10 #+HTML_HEAD:   pre {background-color: #111; color: #ccc;}
11 #+HTML_HEAD: </style>
12
13 * General
14 - This program is free software: released under Creative Commons Zero
15   (CC0) license
16
17 - Program author:
18   - Svjatoslav Agejenko
19   - Homepage: https://svjatoslav.eu
20   - Email: mailto://svjatoslav@svjatoslav.eu
21
22 - [[https://www.svjatoslav.eu/projects/][Other software projects hosted at svjatoslav.eu]]
23
24 ** Source code
25 - [[https://www2.svjatoslav.eu/gitweb/?p=sixth-data.git;a=snapshot;h=HEAD;sf=tgz][Download latest snapshot in TAR GZ format]]
26
27 - [[https://www2.svjatoslav.eu/gitweb/?p=sixth-data.git;a=summary][Browse Git repository online]]
28
29 - Clone Git repository using command:
30   : git clone https://www2.svjatoslav.eu/git/sixth-data.git
31
32 - See [[https://www3.svjatoslav.eu/projects/sixth-data/apidocs/][JavaDoc]].
33
34 * Vision / goal
35   :PROPERTIES:
36   :ID:       f6764282-a6f6-44e6-8716-b428074dd093
37   :END:
38 Provide hackable, versioned, optimized, distributed, geometrical,
39 arbitrary dimensional ([[id:96116550-a6a1-4700-bef7-865d0deee7ea][hypercube based]]) data storage and computation
40 engine ([[id:d2375acc-af14-4f18-8ad0-7949501178c5][as inspired by the brain]]) for general purpose visual computing
41 environment called [[http://www2.svjatoslav.eu/gitbrowse/sixth/doc/index.html][Sixth]].
42
43 Because [[http://www.paulgraham.com/rootsoflisp.html][Lisp is hackable self defined programmable programming
44 language]] it would be used to provide [[https://en.wikipedia.org/wiki/Imperative_programming][imperative programming]] support.
45 * Inspiration
46 :PROPERTIES:
47 :ID:       0fa6354b-18c9-4120-bbf5-c7239aebecab
48 :END:
49 + see also: [[https://en.wikipedia.org/wiki/OLAP_cube][OLAP cube]].
50 ** Brain
51   :PROPERTIES:
52   :ID:       d2375acc-af14-4f18-8ad0-7949501178c5
53   :END:
54 + Brain appears to be natural geometrical/parallel data storage and
55   computational engine:
56   + https://www.quantamagazine.org/the-brain-maps-out-ideas-and-memories-like-spaces-20190114/
57
58 + Even more awesome is that brain appears to operate and is wired as
59   arbitrary/variable dimensional structure:
60   https://singularityhub.com/2017/06/21/is-there-a-multidimensional-mathematical-world-hidden-in-the-brains-computation/
61
62 + On top of this, this multidimensional space that brain represents
63   has dynamic/variable resolution/density:
64   + https://www.quantamagazine.org/goals-and-rewards-redraw-the-brains-map-of-the-world-20190328
65
66 + Such properties allow parallel [[id:171fe375-c737-41e6-b429-a414f6abc5d8][Geometrical computation]] and
67   beautifully fits [[id:01aa65c1-3d44-44a8-9b90-58454bc6be80][CM-1 Connection Machine]] architecture (for extra
68   hardware accelerated solution).
69
70 ** CM-1 Connection Machine
71 :PROPERTIES:
72 :ID:       01aa65c1-3d44-44a8-9b90-58454bc6be80
73 :END:
74 https://en.wikipedia.org/wiki/Connection_Machine
75
76 Massively parallel (thousands of CPUs) connected via
77 machine's internal 12-dimensional hypercube network allows to
78 efficiently simulate arbitrary dimensional hypercube and network
79 topology between computational units. So that when we are
80 solving/simulating for example 5 dimensional problem, we can arrange
81 computational units into virtual 5D network. See:
82 http://www.mission-base.com/tamiko/theory/cm_txts/di-ch2.html
83
84 we can pre-distribute data across computation units and perform
85 parallel [[id:171fe375-c737-41e6-b429-a414f6abc5d8][geometrical computation]].
86
87 * Reasons for hypercube as a so called first class citizen
88 :PROPERTIES:
89 :ID:       96116550-a6a1-4700-bef7-865d0deee7ea
90 :END:
91 + Hypercube is quite general purpose data structure that naturally
92   encapsulates wide variety data and problems.
93
94 + Nicely captures apparent [[id:d2375acc-af14-4f18-8ad0-7949501178c5][properties of the brain]].
95
96 + Naturally supports distributed and parallel [[id:171fe375-c737-41e6-b429-a414f6abc5d8][geometrical data storage
97   and computation.]]
98
99 + Dedicated hardware like [[id:01aa65c1-3d44-44a8-9b90-58454bc6be80][CM-1]] can be built around hypercube concept
100   that results in data, computation process and hardware, all
101   beautifully fitting together while complementing each other
102   strengths.
103
104 + Hypercube stored data (and computation process) has geometry by its
105   nature and should fit nicely with "3D first" user interface ideology
106   of the parent [[http://www2.svjatoslav.eu/gitbrowse/sixth/doc/index.html][Sixth]] project.
107 * Geometrical computation idea
108 :PROPERTIES:
109 :ID:       171fe375-c737-41e6-b429-a414f6abc5d8
110 :END:
111 ** Distributed computation and data storage
112    :PROPERTIES:
113    :ID:       5d287158-53ea-44a2-a754-dd862366066a
114    :END:
115 Lots of problems can be translated to geometry (use any shapes and as
116 many dimensions as you need). Solution(s) to such problems could be
117 then found via geometrical search/comparison/lookup results. As a
118 bonus, such geometrical *data storage* AND *computation* can be
119 naturally made in *parallel* and *distributed*.
120
121 Learning means building/updating/re-balancing the model (the hard
122 part). Question answering is making (relatively simple) lookups
123 (geometrical queries) against the model.
124 ** Mapping hypercube to object-oriented model and relational database
125    :PROPERTIES:
126    :ID:       a117c11e-97c1-4822-88b2-9fc10f96caec
127    :END:
128 Object oriented programming is inspired by the way human mind
129 operates. It allows programmer to express ideas to computer in a more
130 human-like terms.
131
132 It is actually also possible to map object model and relational
133 database to geometrical hyperspace:
134
135 + Object or database table row is a point in hypercube arbitrary
136   dimensional space. Each object member variable or database table
137   column can be mapped to its own dimension in hypercube. That is: if
138   class declares 4 variables for an object, then corresponding object
139   can be stored as a single point inside 4 dimensional
140   hypercube. Variable values translate to point coordinates in that
141   hypercube. That is: numbers and string can be translated to linear
142   value that can be used as a coordinate along particular dimension.
143
144 + Each object class or database table declares its own hypercube that
145   contain instances (objects) of that class or rows of a table.
146
147 ** Mapping entity relations in hypercube
148    :PROPERTIES:
149    :ID:       b6b15bd2-c78b-4c51-a343-72843a515c29
150    :END:
151 Consider we want to create database of:
152 + Books.
153 + Authors.
154 + Effort: Amount of time contributed by every author to every book
155   that he/she wrote.
156
157 Information above can be represented as 3D cube where dimensions are:
158 + X: Book
159 + Y: Author
160 + Z: Effort
161
162 Points in that cube would nicely capture many to many relations
163 between authors and the books.
164 * Current status
165 - More or less defined [[id:f6764282-a6f6-44e6-8716-b428074dd093][Vision / goal]].
166
167 - Collected some [[id:0fa6354b-18c9-4120-bbf5-c7239aebecab][inspiring]] [[id:171fe375-c737-41e6-b429-a414f6abc5d8][ideas]].
168
169 - Implemented very simple persistent key-value map.
170   - Long term goal is to use it as a backing storage engine and
171     implement more advanced features on top of this via layered
172     architecture.
173
174 * See also
175 Interesting or competing projects with good ideas:
176
177 + Analyze and share complex multi-dimensional data at scale
178   https://tiledb.com/
179
180 + [[https://github.com/vygr/ChrysaLisp][ChrysaLisp]]
181   + Assembler/C-Script/Lisp 64 bit, MIMD, multi CPU, multi threaded,
182     multi core, multi user Parallel OS. With GUI, Terminal, OO
183     Assembler, Class libraries, C-Script compiler, Lisp interpreter,
184     Debugger, and more...
185
186 + [[id:01aa65c1-3d44-44a8-9b90-58454bc6be80][CM-1 Connection Machine]]
187
188 + [[http://esug.org/data/ESUG2015/3%20wednesday/1100-1130%20SQL%20Queries%20on%20Smalltalk%20Objects/SQL%20Queries%20in%20Smalltalk%20(James%20Foster).pdf][Gemstone/S]]
189   + Completely distributed smalltalk based computing
190     system.
191
192 + GRAKN.AI
193   + database in the form of a knowledge graph that uses machine
194     reasoning to simplify data processing challenges for AI
195     applications. https://grakn.ai/
196
197 + http://phantomos.org/
198   + Programs run forever. System crash or reboot does not destroy
199     state of running program.
200
201 + [[http://wiki.squeak.org/squeak/2665][Magma]]
202   + Multi-user object database for Squeak
203
204 + Taichi: A Language for High-Performance Computation onSpatially
205   Sparse Data Structures
206   + http://taichi.graphics/wp-content/uploads/2019/09/taichi_lang.pdf
207
208 + [[http://www.uruk.org/emu/Taos.html][TAOS]]
209   + Completely distributed operating system/virtual machine: