Added another brain-space related link.
[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 <!-- 2019-08-04 Sun 23:14 -->
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>
205 </li>
206
207 <li>This program is free software: you can redistribute it and/or modify
208 it under the terms of the <a href="https://www.gnu.org/licenses/lgpl.html">GNU Lesser General Public License</a> as
209 published by the Free Software Foundation, either version 3 of the
210 License, or (at your option) any later version.
211 </li>
212
213 <li>Program author:
214 <ul class="org-ul">
215 <li>Svjatoslav Agejenko
216 </li>
217 <li>Homepage: <a href="https://svjatoslav.eu">https://svjatoslav.eu</a>
218 </li>
219 <li>Email: <a href="mailto://svjatoslav@svjatoslav.eu">mailto://svjatoslav@svjatoslav.eu</a>
220 </li>
221 </ul>
222 </li>
223
224 <li><a href="https://www.svjatoslav.eu/projects/">Other software projects hosted at svjatoslav.eu</a>
225 </li>
226 </ul>
227 </div>
228
229 <div id="outline-container-sec-1-1" class="outline-3">
230 <h3 id="sec-1-1"><span class="section-number-3">1.1</span> Source code</h3>
231 <div class="outline-text-3" id="text-1-1">
232 <ul class="org-ul">
233 <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>
234 </li>
235
236 <li><a href="https://www2.svjatoslav.eu/gitweb/?p=sixth-data.git;a=summary">Browse Git repository online</a>
237 </li>
238
239 <li>Clone Git repository using command:
240 <pre class="example">
241 git clone https://www2.svjatoslav.eu/git/sixth-data.git
242
243 </pre>
244 </li>
245
246 <li>See <a href="https://www3.svjatoslav.eu/projects/sixth-data/apidocs/">JavaDoc</a>.
247 </li>
248 </ul>
249 </div>
250 </div>
251 </div>
252
253 <div id="outline-container-sec-2" class="outline-2">
254 <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>
255 <div class="outline-text-2" id="text-2">
256 <p>
257 Provide versioned, clustered, flexible, distributed, multi-dimensional
258 data storage engine for the <a href="http://www2.svjatoslav.eu/gitbrowse/sixth/doc/index.html">Sixth computation engine</a>.
259 </p>
260
261 <ul class="org-ul">
262 <li>Speaking of traditional relational database and object oriented
263 business applications:
264
265 <ul class="org-ul">
266 <li>I hate object-relational impedance mismatch.
267 </li>
268
269 <li>I don't like to convert data between persistent database and
270 runtime objects for every transaction. How about creating united
271 database/computation engine instead to:
272 </li>
273
274 <li>Eliminate constant moving and converting of data between 2 systems
275 and make computing happen close to where the data is stored.
276 </li>
277
278 <li>Abstract away difference between RAM VS persistent storage. Let
279 the system decide at runtime which data to keep in what kind of
280 memory.
281 </li>
282 </ul>
283 </li>
284 </ul>
285 </div>
286 </div>
287
288 <div id="outline-container-sec-3" class="outline-2">
289 <h2 id="sec-3"><span class="section-number-2">3</span> Inspiration</h2>
290 <div class="outline-text-2" id="text-3">
291 <ul class="org-ul">
292 <li>Relational databases:
293 <ul class="org-ul">
294 <li>Transactional.
295 </li>
296 <li>Indexable / Quickly searchable.
297 </li>
298 </ul>
299 </li>
300
301 <li>Git (version control system)
302 <ul class="org-ul">
303 <li>Versionable
304 </li>
305 <li>Branchable / mergeable.
306 </li>
307 <li>Transparent cansistency, checksumming and deduplication.
308 </li>
309 <li>(Git as a database:
310 </li>
311 </ul>
312 <p>
313 <a href="https://www.kenneth-truyers.net/2016/10/13/git-nosql-database/">https://www.kenneth-truyers.net/2016/10/13/git-nosql-database/</a> )
314 </p>
315 </li>
316 </ul>
317 </div>
318
319 <div id="outline-container-sec-3-1" class="outline-3">
320 <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>
321 <div class="outline-text-3" id="text-3-1">
322 <ul class="org-ul">
323 <li>Brain appears to have more than 3D dimensional design:
324 <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>
325 </li>
326
327 <li>Brain appears to use geometry to map thoughts and even sounds:
328 <ul class="org-ul">
329 <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>
330 </li>
331 <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>
332 </li>
333 </ul>
334 </li>
335
336 <li>It directly inspires following ideas
337 <ul class="org-ul">
338 <li><a href="#sec-4-1">Distributed comutation and data storage</a>
339 </li>
340 <li><a href="#sec-4-2">Mapping of hyperspace to traditional object-oriented model</a>
341 </li>
342 <li><a href="#sec-4-3">Handling of relations</a>
343 </li>
344 </ul>
345 </li>
346 </ul>
347 </div>
348 </div>
349 </div>
350 <div id="outline-container-sec-4" class="outline-2">
351 <h2 id="sec-4"><span class="section-number-2">4</span> Ideas</h2>
352 <div class="outline-text-2" id="text-4">
353 </div><div id="outline-container-sec-4-1" class="outline-3">
354 <h3 id="sec-4-1"><a id="ID-5d287158-53ea-44a2-a754-dd862366066a" name="ID-5d287158-53ea-44a2-a754-dd862366066a"></a><span class="section-number-3">4.1</span> Distributed computation and data storage</h3>
355 <div class="outline-text-3" id="text-4-1">
356 <p>
357 Maybe every problem can be translated to geometry (use any shapes and
358 as many dimensions as you need). Solution(s) to such problems would
359 then appear as relatively simple search/comparison/lookup results. As
360 a bonus, such geometrical *data storage* AND *computation* can be
361 naturally made in *parallel* and *distributed*. That's what neurons in
362 the brain appear to be doing ! :) . Learning means building/updating
363 the model (the hard part). Question answering is making (relatively
364 simple) lookups (geometrical queries) against the model.
365 </p>
366 </div>
367 </div>
368 <div id="outline-container-sec-4-2" class="outline-3">
369 <h3 id="sec-4-2"><a id="ID-a117c11e-97c1-4822-88b2-9fc10f96caec" name="ID-a117c11e-97c1-4822-88b2-9fc10f96caec"></a><span class="section-number-3">4.2</span> Mapping of hyperspace to traditional object-oriented model</h3>
370 <div class="outline-text-3" id="text-4-2">
371 <p>
372 Object oriented programming is inspired by the way human mind
373 operates. It allows programmer to express ideas to computer in a more
374 human-like terms.
375 </p>
376
377 <p>
378 It is possible to map object model to geometrical hyperspace:
379 </p>
380
381 <ul class="org-ul">
382 <li>Object is a point in space (universe). Each object member variable
383 translates to its own dimension. That is: if class declares 4
384 variables for an object, then corresponding object can be stored as
385 a single point inside 4 dimensional space. Variable values translate
386 to point coordinates in space. That is: Integer, floating point
387 number and even boolean and string can be translated to linear value
388 that can be used as a coordinate along particular dimension.
389 </li>
390
391 <li>Each class declares its own space (universe). All class instances
392 (objects) are points inside that particular universe. References
393 between objects of different types are hyperlinks (portals) between
394 different universes.
395 </li>
396 </ul>
397 </div>
398 </div>
399 <div id="outline-container-sec-4-3" class="outline-3">
400 <h3 id="sec-4-3"><a id="ID-b6b15bd2-c78b-4c51-a343-72843a515c29" name="ID-b6b15bd2-c78b-4c51-a343-72843a515c29"></a><span class="section-number-3">4.3</span> Handling of relations</h3>
401 <div class="outline-text-3" id="text-4-3">
402 <p>
403 Consider we want to create database of books and authors. Book can
404 have multiple authors, and single person can be author for multiple
405 books. It is possible to store how many hours of work each author has
406 contributed to every book, using hyperspace as follows:
407 </p>
408
409 <ul class="org-ul">
410 <li>Every dimension corresponds to one particular book author. (10
411 authors in the database, would require 10 dimensional space)
412 <ul class="org-ul">
413 <li>Point in space corresponds to one particular book.
414 <ul class="org-ul">
415 <li>Point location along particular (author) dimension corresponds
416 to amount of work contributed by particular author for given
417 book.
418 </li>
419 </ul>
420 </li>
421 </ul>
422 </li>
423 </ul>
424
425 <p>
426 Alternatively:
427 </p>
428
429 <ul class="org-ul">
430 <li>Every dimension corresponds to one particular book.
431 <ul class="org-ul">
432 <li>Point in space corresponds to one particular author in the entire
433 database.
434 <ul class="org-ul">
435 <li>Point location along particular (book) dimension corresponds to
436 amount of work contributed for book by given author (point).
437 </li>
438 </ul>
439 </li>
440 </ul>
441 </li>
442 </ul>
443 </div>
444 </div>
445
446 <div id="outline-container-sec-4-4" class="outline-3">
447 <h3 id="sec-4-4"><span class="section-number-3">4.4</span> Layered architecture</h3>
448 <div class="outline-text-3" id="text-4-4">
449 <dl class="org-dl">
450 <dt> layer 1 </dt><dd>disk / block storage / partition
451 </dd>
452
453 <dt> layer 2 </dt><dd>key/value storage. Keys are unique and are dictated by
454 storage engine. Value is arbitrary but limited size byte
455 array. This layer is responsible for handling disk
456 defragmentation and consistency in case of crash
457 recovery.
458 </dd>
459
460 <dt> layer 3 </dt><dd>key/value storage. Keys are content hashes. Values are
461 arbitrary but limited size content byte arrays. This
462 layer effectively implements content addressable
463 storage. Content addressible storage enables GIT-like
464 behavior (possibility for competing branches, retaining
465 history, transparent deduplication)
466 </dd>
467
468 <dt> layer 4 </dt><dd>Implements arbitrary dimensional multiverse.
469 </dd>
470
471 <dt> layer 5 </dt><dd>Distributed computation engine.
472 </dd>
473 </dl>
474 </div>
475 </div>
476 </div>
477 <div id="outline-container-sec-5" class="outline-2">
478 <h2 id="sec-5"><span class="section-number-2">5</span> Current status</h2>
479 <div class="outline-text-2" id="text-5">
480 <ul class="org-ul">
481 <li>More or less defined <a href="#sec-2">Vision / goal</a>.
482 </li>
483
484 <li>Collected some <a href="#sec-3-1">ideas</a>.
485 </li>
486
487 <li>Implemented very simple persistent key-value map.
488 <ul class="org-ul">
489 <li>Long term goal is to use it as a backing storage engine and
490 implement more advanced features on top of this.
491 </li>
492 </ul>
493 </li>
494 </ul>
495 </div>
496 </div>
497
498 <div id="outline-container-sec-6" class="outline-2">
499 <h2 id="sec-6"><span class="section-number-2">6</span> See also</h2>
500 <div class="outline-text-2" id="text-6">
501 <p>
502 Interesting or competing projects with good ideas:
503 </p>
504
505 <ul class="org-ul">
506 <li>GRAKN.AI
507 <ul class="org-ul">
508 <li>database in the form of a knowledge graph that uses machine
509 reasoning to simplify data processing challenges for AI
510 applications. <a href="https://grakn.ai/">https://grakn.ai/</a>
511 </li>
512 </ul>
513 </li>
514
515 <li><a href="http://wiki.squeak.org/squeak/2665">Magma</a>
516 <ul class="org-ul">
517 <li>Multi-user object database for Squeak
518 </li>
519 </ul>
520 </li>
521
522 <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>
523 <ul class="org-ul">
524 <li>Completely distributed smalltalk based computing
525 system.
526 </li>
527 </ul>
528 </li>
529
530 <li><a href="http://www.uruk.org/emu/Taos.html">TAOS</a>
531 <ul class="org-ul">
532 <li>Completely distributed operating system/virtual machine:
533 </li>
534 </ul>
535 </li>
536
537 <li><a href="https://github.com/vygr/ChrysaLisp">ChrysaLisp</a>
538 <ul class="org-ul">
539 <li>Assembler/C-Script/Lisp 64 bit, MIMD, multi CPU, multi threaded,
540 multi core, multi user Parallel OS. With GUI, Terminal, OO
541 Assembler, Class libraries, C-Script compiler, Lisp interpreter,
542 Debugger, and more&#x2026;
543 </li>
544 </ul>
545 </li>
546 </ul>
547 </div>
548 </div>
549 </div><div class="col-md-3"><nav id="table-of-contents">
550 <div id="text-table-of-contents" class="bs-docs-sidebar">
551 <ul class="nav">
552 <li><a href="#sec-1">1. General</a>
553 <ul class="nav">
554 <li><a href="#sec-1-1">1.1. Source code</a></li>
555 </ul>
556 </li>
557 <li><a href="#sec-2">2. Vision / goal</a></li>
558 <li><a href="#sec-3">3. Inspiration</a>
559 <ul class="nav">
560 <li><a href="#sec-3-1">3.1. Brain</a></li>
561 </ul>
562 </li>
563 <li><a href="#sec-4">4. Ideas</a>
564 <ul class="nav">
565 <li><a href="#sec-4-1">4.1. Distributed computation and data storage</a></li>
566 <li><a href="#sec-4-2">4.2. Mapping of hyperspace to traditional object-oriented model</a></li>
567 <li><a href="#sec-4-3">4.3. Handling of relations</a></li>
568 <li><a href="#sec-4-4">4.4. Layered architecture</a></li>
569 </ul>
570 </li>
571 <li><a href="#sec-5">5. Current status</a></li>
572 <li><a href="#sec-6">6. See also</a></li>
573 </ul>
574 </div>
575 </nav>
576 </div></div></div>
577 <footer id="postamble" class="">
578 <div><p class="author">Author: Svjatoslav Agejenko</p>
579 <p class="date">Created: 2019-08-04 Sun 23:14</p>
580 <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>
581 </div>
582 </footer>
583 </body>
584 </html>