9b7529556aac3310ceb3089f9f1fb705e7df91a4
[sixth-data.git] / doc / index.html
1 <!doctype html>
2 <html lang="en">
3 <head>
4 <title>Sixth Data - Data storage and computing engine</title>
5 <!-- 2020-01-29 K 22:47 -->
6 <meta charset="utf-8">
7 <meta name="viewport" content="width=device-width, initial-scale=1">
8 <meta name="generator" content="Org-mode">
9 <meta name="author" content="Svjatoslav Agejenko">
10 <link href="https://bootswatch.com/3/darkly/bootstrap.min.css" rel="stylesheet">
11 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
12 <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/js/bootstrap.min.js"></script>
13 <style type="text/css">
14 footer {background-color: #111 !important;}
15 pre {background-color: #111; color: #ccc;}
16 </style>
17 <style type="text/css">
18 /* org mode styles on top of twbs */
19
20 html {
21     position: relative;
22     min-height: 100%;
23 }
24
25 body {
26     font-size: 18px;
27     margin-bottom: 105px;
28 }
29
30 footer {
31     position: absolute;
32     bottom: 0;
33     width: 100%;
34     height: 101px;
35     background-color: #f5f5f5;
36 }
37
38 footer > div {
39     padding: 10px;
40 }
41
42 footer p {
43     margin: 0 0 5px;
44     text-align: center;
45     font-size: 16px;
46 }
47
48 #table-of-contents {
49     margin-top: 20px;
50     margin-bottom: 20px;
51 }
52
53 blockquote p {
54     font-size: 18px;
55 }
56
57 pre {
58     font-size: 16px;
59 }
60
61 .footpara {
62     display: inline-block;
63 }
64
65 figcaption {
66   font-size: 16px;
67   color: #666;
68   font-style: italic;
69   padding-bottom: 15px;
70 }
71
72 /* from twbs docs */
73
74 .bs-docs-sidebar.affix {
75     position: static;
76 }
77 @media (min-width: 768px) {
78     .bs-docs-sidebar {
79         padding-left: 20px;
80     }
81 }
82
83 /* All levels of nav */
84 .bs-docs-sidebar .nav > li > a {
85     display: block;
86     padding: 4px 20px;
87     font-size: 14px;
88     font-weight: 500;
89     color: #999;
90 }
91 .bs-docs-sidebar .nav > li > a:hover,
92 .bs-docs-sidebar .nav > li > a:focus {
93     padding-left: 19px;
94     color: #A1283B;
95     text-decoration: none;
96     background-color: transparent;
97     border-left: 1px solid #A1283B;
98 }
99 .bs-docs-sidebar .nav > .active > a,
100 .bs-docs-sidebar .nav > .active:hover > a,
101 .bs-docs-sidebar .nav > .active:focus > a {
102     padding-left: 18px;
103     font-weight: bold;
104     color: #A1283B;
105     background-color: transparent;
106     border-left: 2px solid #A1283B;
107 }
108
109 /* Nav: second level (shown on .active) */
110 .bs-docs-sidebar .nav .nav {
111     display: none; /* Hide by default, but at >768px, show it */
112     padding-bottom: 10px;
113 }
114 .bs-docs-sidebar .nav .nav > li > a {
115     padding-top: 1px;
116     padding-bottom: 1px;
117     padding-left: 30px;
118     font-size: 12px;
119     font-weight: normal;
120 }
121 .bs-docs-sidebar .nav .nav > li > a:hover,
122 .bs-docs-sidebar .nav .nav > li > a:focus {
123     padding-left: 29px;
124 }
125 .bs-docs-sidebar .nav .nav > .active > a,
126 .bs-docs-sidebar .nav .nav > .active:hover > a,
127 .bs-docs-sidebar .nav .nav > .active:focus > a {
128     padding-left: 28px;
129     font-weight: 500;
130 }
131
132 /* Nav: third level (shown on .active) */
133 .bs-docs-sidebar .nav .nav .nav {
134     padding-bottom: 10px;
135 }
136 .bs-docs-sidebar .nav .nav .nav > li > a {
137     padding-top: 1px;
138     padding-bottom: 1px;
139     padding-left: 40px;
140     font-size: 12px;
141     font-weight: normal;
142 }
143 .bs-docs-sidebar .nav .nav .nav > li > a:hover,
144 .bs-docs-sidebar .nav .nav .nav > li > a:focus {
145     padding-left: 39px;
146 }
147 .bs-docs-sidebar .nav .nav .nav > .active > a,
148 .bs-docs-sidebar .nav .nav .nav > .active:hover > a,
149 .bs-docs-sidebar .nav .nav .nav > .active:focus > a {
150     padding-left: 38px;
151     font-weight: 500;
152 }
153
154 /* Show and affix the side nav when space allows it */
155 @media (min-width: 992px) {
156     .bs-docs-sidebar .nav > .active > ul {
157         display: block;
158     }
159     /* Widen the fixed sidebar */
160     .bs-docs-sidebar.affix,
161     .bs-docs-sidebar.affix-bottom {
162         width: 213px;
163     }
164     .bs-docs-sidebar.affix {
165         position: fixed; /* Undo the static from mobile first approach */
166         top: 20px;
167     }
168     .bs-docs-sidebar.affix-bottom {
169         position: absolute; /* Undo the static from mobile first approach */
170     }
171     .bs-docs-sidebar.affix .bs-docs-sidenav,.bs-docs-sidebar.affix-bottom .bs-docs-sidenav {
172         margin-top: 0;
173         margin-bottom: 0
174     }
175 }
176 @media (min-width: 1200px) {
177     /* Widen the fixed sidebar again */
178     .bs-docs-sidebar.affix-bottom,
179     .bs-docs-sidebar.affix {
180         width: 263px;
181     }
182 }
183 </style>
184 <script type="text/javascript">
185 $(function() {
186     'use strict';
187
188     $('.bs-docs-sidebar li').first().addClass('active');
189
190     $(document.body).scrollspy({target: '.bs-docs-sidebar'});
191
192     $('.bs-docs-sidebar').affix();
193 });
194 </script>
195 </head>
196 <body>
197 <div id="content" class="container">
198 <div class="row"><div class="col-md-9"><h1 class="title">Sixth Data - Data storage and computing engine</h1>
199
200 <div id="outline-container-sec-1" class="outline-2">
201 <h2 id="sec-1"><span class="section-number-2">1</span> General</h2>
202 <div class="outline-text-2" id="text-1">
203 <ul class="org-ul">
204 <li>This is a subproject of <a href="https://www3.svjatoslav.eu/projects/sixth/">Sixth</a> with the goal of providing data
205 storage and computation facilities.
206 </li>
207
208 <li>This program is free software: you can redistribute it and/or modify
209 it under the terms of the <a href="https://www.gnu.org/licenses/lgpl.html">GNU Lesser General Public License</a> as
210 published by the Free Software Foundation, either version 3 of the
211 License, or (at your option) any later version.
212 </li>
213
214 <li>Program author:
215 <ul class="org-ul">
216 <li>Svjatoslav Agejenko
217 </li>
218 <li>Homepage: <a href="https://svjatoslav.eu">https://svjatoslav.eu</a>
219 </li>
220 <li>Email: <a href="mailto://svjatoslav@svjatoslav.eu">mailto://svjatoslav@svjatoslav.eu</a>
221 </li>
222 </ul>
223 </li>
224
225 <li><a href="https://www.svjatoslav.eu/projects/">Other software projects hosted at svjatoslav.eu</a>
226 </li>
227 </ul>
228 </div>
229
230 <div id="outline-container-sec-1-1" class="outline-3">
231 <h3 id="sec-1-1"><span class="section-number-3">1.1</span> Source code</h3>
232 <div class="outline-text-3" id="text-1-1">
233 <ul class="org-ul">
234 <li><a href="https://www2.svjatoslav.eu/gitweb/?p=sixth-data.git;a=snapshot;h=HEAD;sf=tgz">Download latest snapshot in TAR GZ format</a>
235 </li>
236
237 <li><a href="https://www2.svjatoslav.eu/gitweb/?p=sixth-data.git;a=summary">Browse Git repository online</a>
238 </li>
239
240 <li>Clone Git repository using command:
241 <pre class="example">
242 git clone https://www2.svjatoslav.eu/git/sixth-data.git
243
244 </pre>
245 </li>
246 </ul>
247 </div>
248 </div>
249 </div>
250
251 <div id="outline-container-sec-2" class="outline-2">
252 <h2 id="sec-2"><a id="ID-f6764282-a6f6-44e6-8716-b428074dd093" name="ID-f6764282-a6f6-44e6-8716-b428074dd093"></a><span class="section-number-2">2</span> Vision / goal</h2>
253 <div class="outline-text-2" id="text-2">
254 <p>
255 Provide hackable, versioned, optimized, distributed, geometrical,
256 arbitrary dimensional (<a href="#sec-4">hypercube based</a>) data storage and computation
257 engine (<a href="#sec-3-1">as inspired by the brain</a>) for general purpose visual computing
258 environment called <a href="http://www2.svjatoslav.eu/gitbrowse/sixth/doc/index.html">Sixth</a>.
259 </p>
260
261 <p>
262 Because <a href="http://www.paulgraham.com/rootsoflisp.html">Lisp is hackable self defined programmable programming
263 language</a> it would be used to provide <a href="https://en.wikipedia.org/wiki/Imperative_programming">imperative programming</a> support.
264 </p>
265 </div>
266 </div>
267 <div id="outline-container-sec-3" class="outline-2">
268 <h2 id="sec-3"><a id="ID-0fa6354b-18c9-4120-bbf5-c7239aebecab" name="ID-0fa6354b-18c9-4120-bbf5-c7239aebecab"></a><span class="section-number-2">3</span> Inspiration</h2>
269 <div class="outline-text-2" id="text-3">
270 <ul class="org-ul">
271 <li>see also: <a href="https://en.wikipedia.org/wiki/OLAP_cube">OLAP cube</a>.
272 </li>
273 </ul>
274 </div>
275 <div id="outline-container-sec-3-1" class="outline-3">
276 <h3 id="sec-3-1"><a id="ID-d2375acc-af14-4f18-8ad0-7949501178c5" name="ID-d2375acc-af14-4f18-8ad0-7949501178c5"></a><span class="section-number-3">3.1</span> Brain</h3>
277 <div class="outline-text-3" id="text-3-1">
278 <ul class="org-ul">
279 <li>Brain appears to be natural geometrical/parallel data storage and
280 computational engine:
281 <ul class="org-ul">
282 <li><a href="https://www.quantamagazine.org/the-brain-maps-out-ideas-and-memories-like-spaces-20190114/">https://www.quantamagazine.org/the-brain-maps-out-ideas-and-memories-like-spaces-20190114/</a>
283 </li>
284 </ul>
285 </li>
286
287 <li>Even more awesome is that brain appears to operate and is wired as
288 arbitrary/variable dimensional structure:
289 <a href="https://singularityhub.com/2017/06/21/is-there-a-multidimensional-mathematical-world-hidden-in-the-brains-computation/">https://singularityhub.com/2017/06/21/is-there-a-multidimensional-mathematical-world-hidden-in-the-brains-computation/</a>
290 </li>
291
292 <li>On top of this, this multidimensional space that brain represents
293 has dynamic/variable resolution/density:
294 <ul class="org-ul">
295 <li><a href="https://www.quantamagazine.org/goals-and-rewards-redraw-the-brains-map-of-the-world-20190328">https://www.quantamagazine.org/goals-and-rewards-redraw-the-brains-map-of-the-world-20190328</a>
296 </li>
297 </ul>
298 </li>
299
300 <li>Such properties allow parallel <a href="#sec-5">Geometrical computation</a> and
301 beautifully fits <a href="#sec-3-2">CM-1 Connection Machine</a> architecture (for extra
302 hardware accelerated solution).
303 </li>
304 </ul>
305 </div>
306 </div>
307
308 <div id="outline-container-sec-3-2" class="outline-3">
309 <h3 id="sec-3-2"><a id="ID-01aa65c1-3d44-44a8-9b90-58454bc6be80" name="ID-01aa65c1-3d44-44a8-9b90-58454bc6be80"></a><span class="section-number-3">3.2</span> CM-1 Connection Machine</h3>
310 <div class="outline-text-3" id="text-3-2">
311 <p>
312 <a href="https://en.wikipedia.org/wiki/Connection_Machine">https://en.wikipedia.org/wiki/Connection_Machine</a>
313 </p>
314
315 <p>
316 Massively parallel (thousands of CPUs) connected via
317 machine's internal 12-dimensional hypercube network allows to
318 efficiently simulate arbitrary dimensional hypercube and network
319 topology between computational units. So that when we are
320 solving/simulating for example 5 dimensional problem, we can arrange
321 computational units into virtual 5D network. See:
322 <a href="http://www.mission-base.com/tamiko/theory/cm_txts/di-ch2.html">http://www.mission-base.com/tamiko/theory/cm_txts/di-ch2.html</a>
323 </p>
324
325 <p>
326 we can pre-distribute data across computation units and perform
327 parallel <a href="#sec-5">geometrical computation</a>.
328 </p>
329 </div>
330 </div>
331 </div>
332
333 <div id="outline-container-sec-4" class="outline-2">
334 <h2 id="sec-4"><a id="ID-96116550-a6a1-4700-bef7-865d0deee7ea" name="ID-96116550-a6a1-4700-bef7-865d0deee7ea"></a><span class="section-number-2">4</span> Reasons for hypercube as a so called first class citizen</h2>
335 <div class="outline-text-2" id="text-4">
336 <ul class="org-ul">
337 <li>Hypercube is quite general purpose data structure that naturally
338 encapsulates wide variety data and problems.
339 </li>
340
341 <li>Nicely captures apparent <a href="#sec-3-1">properties of the brain</a>.
342 </li>
343
344 <li>Naturally supports distributed and parallel <a href="#sec-5">geometrical data storage
345 and computation.</a>
346 </li>
347
348 <li>Dedicated hardware like <a href="#sec-3-2">CM-1</a> can be built around hypercube concept
349 that results in data, computation process and hardware, all
350 beautifully fitting together while complementing each other
351 strengths.
352 </li>
353
354 <li>Hypercube stored data (and computation process) has geometry by its
355 nature and should fit nicely with "3D first" user interface ideology
356 of the parent <a href="http://www2.svjatoslav.eu/gitbrowse/sixth/doc/index.html">Sixth</a> project.
357 </li>
358 </ul>
359 </div>
360 </div>
361 <div id="outline-container-sec-5" class="outline-2">
362 <h2 id="sec-5"><a id="ID-171fe375-c737-41e6-b429-a414f6abc5d8" name="ID-171fe375-c737-41e6-b429-a414f6abc5d8"></a><span class="section-number-2">5</span> Geometrical computation idea</h2>
363 <div class="outline-text-2" id="text-5">
364 </div>
365 <div id="outline-container-sec-5-1" class="outline-3">
366 <h3 id="sec-5-1"><a id="ID-5d287158-53ea-44a2-a754-dd862366066a" name="ID-5d287158-53ea-44a2-a754-dd862366066a"></a><span class="section-number-3">5.1</span> Distributed computation and data storage</h3>
367 <div class="outline-text-3" id="text-5-1">
368 <p>
369 Lots of problems can be translated to geometry (use any shapes and as
370 many dimensions as you need). Solution(s) to such problems could be
371 then found via geometrical search/comparison/lookup results. As a
372 bonus, such geometrical *data storage* AND *computation* can be
373 naturally made in *parallel* and *distributed*.
374 </p>
375
376 <p>
377 Learning means building/updating/re-balancing the model (the hard
378 part). Question answering is making (relatively simple) lookups
379 (geometrical queries) against the model.
380 </p>
381 </div>
382 </div>
383 <div id="outline-container-sec-5-2" class="outline-3">
384 <h3 id="sec-5-2"><a id="ID-a117c11e-97c1-4822-88b2-9fc10f96caec" name="ID-a117c11e-97c1-4822-88b2-9fc10f96caec"></a><span class="section-number-3">5.2</span> Mapping hypercube to object-oriented model and relational database</h3>
385 <div class="outline-text-3" id="text-5-2">
386 <p>
387 Object oriented programming is inspired by the way human mind
388 operates. It allows programmer to express ideas to computer in a more
389 human-like terms.
390 </p>
391
392 <p>
393 It is actually also possible to map object model and relational
394 database to geometrical hyperspace:
395 </p>
396
397 <ul class="org-ul">
398 <li>Object or database table row is a point in hypercube arbitrary
399 dimensional space. Each object member variable or database table
400 column can be mapped to its own dimension in hypercube. That is: if
401 class declares 4 variables for an object, then corresponding object
402 can be stored as a single point inside 4 dimensional
403 hypercube. Variable values translate to point coordinates in that
404 hypercube. That is: numbers and string can be translated to linear
405 value that can be used as a coordinate along particular dimension.
406 </li>
407
408 <li>Each object class or database table declares its own hypercube that
409 contain instances (objects) of that class or rows of a table.
410 </li>
411 </ul>
412 </div>
413 </div>
414
415 <div id="outline-container-sec-5-3" class="outline-3">
416 <h3 id="sec-5-3"><a id="ID-b6b15bd2-c78b-4c51-a343-72843a515c29" name="ID-b6b15bd2-c78b-4c51-a343-72843a515c29"></a><span class="section-number-3">5.3</span> Mapping entity relations in hypercube</h3>
417 <div class="outline-text-3" id="text-5-3">
418 <p>
419 Consider we want to create database of:
420 </p>
421 <ul class="org-ul">
422 <li>Books.
423 </li>
424 <li>Authors.
425 </li>
426 <li>Effort: Amount of time contributed by every author to every book
427 that he/she wrote.
428 </li>
429 </ul>
430
431 <p>
432 Information above can be represented as 3D cube where dimensions are:
433 </p>
434 <ul class="org-ul">
435 <li>X: Book
436 </li>
437 <li>Y: Author
438 </li>
439 <li>Z: Effort
440 </li>
441 </ul>
442
443 <p>
444 Points in that cube would nicely capture many to many relations
445 between authors and the books.
446 </p>
447 </div>
448 </div>
449 </div>
450 <div id="outline-container-sec-6" class="outline-2">
451 <h2 id="sec-6"><span class="section-number-2">6</span> Current status</h2>
452 <div class="outline-text-2" id="text-6">
453 <ul class="org-ul">
454 <li>More or less defined <a href="#sec-2">Vision / goal</a>.
455 </li>
456
457 <li>Collected some <a href="#sec-3">inspiring</a> <a href="#sec-5">ideas</a>.
458 </li>
459
460 <li>Implemented very simple persistent key-value map.
461 <ul class="org-ul">
462 <li>Long term goal is to use it as a backing storage engine and
463 implement more advanced features on top of this via layered
464 architecture.
465 </li>
466 </ul>
467 </li>
468 </ul>
469 </div>
470 </div>
471
472 <div id="outline-container-sec-7" class="outline-2">
473 <h2 id="sec-7"><span class="section-number-2">7</span> See also</h2>
474 <div class="outline-text-2" id="text-7">
475 <p>
476 Interesting or competing projects with good ideas:
477 </p>
478
479 <ul class="org-ul">
480 <li><a href="#sec-3-2">CM-1 Connection Machine</a>
481 </li>
482
483 <li><a href="http://phantomos.org/">http://phantomos.org/</a>
484 <ul class="org-ul">
485 <li>Programs run forever. System crash or reboot does not destroy
486 state of running program.
487 </li>
488 </ul>
489 </li>
490
491 <li>Taichi: A Language for High-Performance Computation onSpatially
492 Sparse Data Structures
493 <ul class="org-ul">
494 <li><a href="http://taichi.graphics/wp-content/uploads/2019/09/taichi_lang.pdf">http://taichi.graphics/wp-content/uploads/2019/09/taichi_lang.pdf</a>
495 </li>
496 </ul>
497 </li>
498
499 <li>GRAKN.AI
500 <ul class="org-ul">
501 <li>database in the form of a knowledge graph that uses machine
502 reasoning to simplify data processing challenges for AI
503 applications. <a href="https://grakn.ai/">https://grakn.ai/</a>
504 </li>
505 </ul>
506 </li>
507
508 <li><a href="http://wiki.squeak.org/squeak/2665">Magma</a>
509 <ul class="org-ul">
510 <li>Multi-user object database for Squeak
511 </li>
512 </ul>
513 </li>
514
515 <li><a href="http://esug.org/data/ESUG2015/3%20wednesday/1100-1130%20SQL%20Queries%20on%20Smalltalk%20Objects/SQL%20Queries%20in%20Smalltalk%20(James%20Foster).pdf">Gemstone/S</a>
516 <ul class="org-ul">
517 <li>Completely distributed smalltalk based computing
518 system.
519 </li>
520 </ul>
521 </li>
522
523 <li><a href="http://www.uruk.org/emu/Taos.html">TAOS</a>
524 <ul class="org-ul">
525 <li>Completely distributed operating system/virtual machine:
526 </li>
527 </ul>
528 </li>
529
530 <li><a href="https://github.com/vygr/ChrysaLisp">ChrysaLisp</a>
531 <ul class="org-ul">
532 <li>Assembler/C-Script/Lisp 64 bit, MIMD, multi CPU, multi threaded,
533 multi core, multi user Parallel OS. With GUI, Terminal, OO
534 Assembler, Class libraries, C-Script compiler, Lisp interpreter,
535 Debugger, and more&#x2026;
536 </li>
537 </ul>
538 </li>
539 </ul>
540 </div>
541 </div>
542 </div><div class="col-md-3"><nav id="table-of-contents">
543 <div id="text-table-of-contents" class="bs-docs-sidebar">
544 <ul class="nav">
545 <li><a href="#sec-1">1. General</a>
546 <ul class="nav">
547 <li><a href="#sec-1-1">1.1. Source code</a></li>
548 </ul>
549 </li>
550 <li><a href="#sec-2">2. Vision / goal</a></li>
551 <li><a href="#sec-3">3. Inspiration</a>
552 <ul class="nav">
553 <li><a href="#sec-3-1">3.1. Brain</a></li>
554 <li><a href="#sec-3-2">3.2. CM-1 Connection Machine</a></li>
555 </ul>
556 </li>
557 <li><a href="#sec-4">4. Reasons for hypercube as a so called first class citizen</a></li>
558 <li><a href="#sec-5">5. Geometrical computation idea</a>
559 <ul class="nav">
560 <li><a href="#sec-5-1">5.1. Distributed computation and data storage</a></li>
561 <li><a href="#sec-5-2">5.2. Mapping hypercube to object-oriented model and relational database</a></li>
562 <li><a href="#sec-5-3">5.3. Mapping entity relations in hypercube</a></li>
563 </ul>
564 </li>
565 <li><a href="#sec-6">6. Current status</a></li>
566 <li><a href="#sec-7">7. See also</a></li>
567 </ul>
568 </div>
569 </nav>
570 </div></div></div>
571 <footer id="postamble" class="">
572 <div><p class="author">Author: Svjatoslav Agejenko</p>
573 <p class="date">Created: 2020-01-29 K 22:47</p>
574 <p class="creator"><a href="http://www.gnu.org/software/emacs/">Emacs</a> 26.1 (<a href="http://orgmode.org">Org-mode</a> 9.1.9)</p>
575 </div>
576 </footer>
577 </body>
578 </html>