-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.html
948 lines (772 loc) · 30.2 KB
/
README.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta name="author" content="alexpetrov"/>
<style type="text/css">
.underline { text-decoration: underline; }
</style>
<link rel="stylesheet" href="./reveal.js/css/reveal.css"/>
<link rel="stylesheet" href="./reveal.js/css/theme/moon.css" id="theme"/>
<link rel="stylesheet" href="./local.css"/>
<!-- If the query includes 'print-pdf', include the PDF print sheet -->
<script>
if( window.location.search.match( /print-pdf/gi ) ) {
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = './reveal.js/css/print/pdf.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
}
</script>
<meta name="description" content="Факты про Datomic.">
</head>
<body>
<div class="reveal">
<div class="slides">
<section id="sec-title-slide">
<h2 class="author">alexpetrov</h2><p class="date">Created: 2022-11-14 Пн 14:27</p>
</section>
<section>
<section id="slide-org6057502">
<h2 id="org6057502"><i>Факты</i> про <b>Datomic</b> и <b>XTDB</b></h2>
<p>
Иммутабельные БД общего назначения
</p>
<p>
16 November 2022
</p>
</section>
</section>
<section>
<section id="slide-org8b2e3c0">
<h3 id="org8b2e3c0"><i>Факты</i> про <b>Datomic</b> и <b>XTDB</b></h3>
<p class="fragment roll-in">
<b>Факт №1</b>
</p>
<p class="fragment roll-in">
<b>Datomic</b> (и <b>XTDB</b>) про <i>Факты</i>
</p>
<p class="fragment roll-in">
"И это есть <i>Факт</i>, Мусьё Дюк!"
</p>
<p class="fragment roll-in">
(c) Господин Смирнов. "<i>Неуловимые Мстители. Корона Российской Империи</i>"
</p>
</section>
</section>
<section>
<section id="slide-org7054499">
<h2 id="org7054499">About me</h2>
<p class="fragment roll-in">
<b>Alexander Petrov</b> (a.k.a Lysenko)
</p>
<p class="fragment roll-in">
<b>Pragmatic Programmer</b> | <b>Sing, Play Sax & Guitar</b> | <b>#Emacs #Clojure #Datomic #DDD #TDD #CleanArchitecture</b>
</p>
<p class="fragment roll-in">
<i>Старший разработчик Clojure</i> Центра продуктов Дозор в Ростелеком Солар
</p>
<p class="fragment roll-in">
<b>2015 - 2022</b> <i>Старший разработчик Ruby / Rails / Erlang</i> в FunBox
</p>
<p class="fragment roll-in">
<b>2006 - 2014</b> <i>Enterprise Java Developer / Trainer / Architect / Team Leader / Lecturer</i>
</p>
</section>
</section>
<section>
<section id="slide-orgff95c62">
<h2 id="orgff95c62">Modeling</h2>
<p class="fragment roll-in">
What if we represent part of <i>the world</i> being digitized as a set of <i>situations</i>?
</p>
<aside class="notes">
<p>
Что если моделировать <i>мир</i> как набор <i>ситуаций</i>?
</p>
</aside>
<p class="fragment roll-in">
<i>Situation</i> is a set of <i>facts</i> that are consistent with each other as of particular <i>point in time</i>.
</p>
<aside class="notes">
<p>
<i>Ситуация</i> - это набор <i>фактов</i> согласованных друг с другом в конкретный <i>момент времени</i>.
</p>
</aside>
<p class="fragment roll-in">
We won't care about anything besides these <i>situations</i>.
</p>
<aside class="notes">
<p>
В рамках моделируемой части <i>мира</i> нас не будет интересовать ничего за пределами <i>ситуаций</i>.
</p>
</aside>
<p class="fragment roll-in">
Having a log of situations, we might replay <i>the world</i> with a <i>tail recursion</i> in a completely <i>functional fasion</i>.
</p>
<aside class="notes">
<p>
Имея журнал ситуаций, мы сможем проигрывать <i>мир</i> функциональным образом проходя через все <i>ситуации</i> хвостовой рекурсией.
</p>
</aside>
<p>
Source talk: <a href="https://www.youtube.com/watch?v=fhOHn9TClXY&feature=youtu.be&t=19m23s">Joe Armstrong Interviews Alan Kay</a>
</p>
<aside class="notes">
<p>
Set of states in the world, that are consistent with each other at a particular time
</p>
</aside>
</section>
</section>
<section>
<section id="slide-org7414182">
<h3 id="org7414182">History of temporal databases</h3>
<p>
The <i>Idea</i> of simulating <i>Time</i> along with <i>Process</i> and <i>States</i> appeared in the paper:
</p>
<p class="fragment roll-in">
<b>1963</b> <i>Jonh McCarthy</i> <a href="http://www.dtic.mil/dtic/tr/fulltext/u2/785031.pdf" class="fragment roll-in">Situations, Actions and Causal Laws</a>
</p>
<p class="fragment roll-in">
<b>2012</b> <i>Rich Hickey</i> implemented the idea in <a href="http://www.datomic.com/" class="fragment roll-in">Datomic</a> database
</p>
<p class="fragment roll-in">
<b>2012</b> <i>Stuart Halloway</i> implemented <a href="https://github.com/Datomic/simulant/wiki" class="fragment roll-in">Simulant</a> library to <a href="https://www.infoq.com/presentations/Simulation-Testing">simulation test</a> <b>Datomic</b> based systems
</p>
<p class="fragment roll-in">
<b>2018-03</b> <i>JUXT</i> compny created <i>XTDB</i> bitemporal open source <i>EDN</i> database
</p>
<aside class="notes">
<p>
Datomic реализует хранение ситуаций в виде транзакций, а Simulant проигрывает эти ситуации имитируя время с разной скоростью.
Это именно то о чём писал Джон МакКарти.
Всё это делается, чтобы иметь рандомизированные повторяемые black box тесты системы.
</p>
</aside>
</section>
</section>
<section>
<section id="slide-org7d06c77">
<h3 id="org7d06c77"><b>Facts</b> Example</h3>
<p class="fragment roll-in">
As of <b>1979</b> Great Guitar Player <a href="https://en.wikipedia.org/wiki/Robben_Ford" class="fragment roll-in">Robben Ford</a> plays in <i>Yellowjackets</i>
</p>
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides" class="fragment roll-in">
<colgroup>
<col class="org-left" />
<col class="org-left" />
<col class="org-left" />
<col class="org-left" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-left">Entity</th>
<th scope="col" class="org-left">Attribute</th>
<th scope="col" class="org-left">Value</th>
<th scope="col" class="org-left">Timestamp</th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-left"><b>Robben Ford</b></td>
<td class="org-left">Plays in</td>
<td class="org-left">"<i>Yellowjackets</i>"</td>
<td class="org-left"><b>1979</b></td>
</tr>
</tbody>
</table>
<p class="fragment roll-in">
Then as of <b>1986</b> he plays in <i>Miles Davis's Band</i>
</p>
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides" class="fragment roll-in">
<colgroup>
<col class="org-left" />
<col class="org-left" />
<col class="org-left" />
<col class="org-left" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-left">Entity</th>
<th scope="col" class="org-left">Attribute</th>
<th scope="col" class="org-left">Value</th>
<th scope="col" class="org-left">Timestamp</th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-left"><b>Robben Ford</b></td>
<td class="org-left">Plays in</td>
<td class="org-left">"<i>Miles Davis's Band</i>"</td>
<td class="org-left"><b>1986</b></td>
</tr>
</tbody>
</table>
<aside class="notes">
<p>
При этом вместе с ним в группе играли и другие музыканты и факты об этом истиннны в тот же момент времени.
</p>
</aside>
</section>
</section>
<section>
<section id="slide-org810ea7b">
<h3 id="org810ea7b">Immutability</h3>
<p class="fragment roll-in">
Imagine <a href="https://en.wikipedia.org/wiki/General_ledger" class="fragment roll-in">General Ledger</a>
</p>
<p class="fragment roll-in">
We save records on paper
</p>
<p class="fragment roll-in">
When situation changes we create <b>new</b> records
</p>
<p class="fragment roll-in">
We <i>NEVER</i> <i>remove</i> <b>old</b> records
</p>
<p class="fragment roll-in">
Lack of computer disc space made us use <i>Place</i> oriented way of saving data
</p>
<p class="fragment roll-in">
Now these <b>space</b> <b>restrictions</b> are not relevant anymore
</p>
</section>
</section>
<section>
<section id="slide-org6b72722">
<h3 id="org6b72722"><b>Facts</b> vs <b>Places</b></h3>
<p>
Fred lives on "Spring St."
</p>
<p>
<b>Place</b> oriented storage
</p>
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
<col class="org-left" />
<col class="org-left" />
</colgroup>
<tbody>
<tr>
<td class="org-left">Name</td>
<td class="org-left">Street</td>
</tr>
<tr>
<td class="org-left">fred</td>
<td class="org-left">"Spring St."</td>
</tr>
</tbody>
</table>
</section>
</section>
<section>
<section id="slide-org40d4a09">
<h3 id="org40d4a09"><b>Facts</b> vs <b>Places</b></h3>
<p>
<b>Place</b> oriented storage
</p>
<p>
<b>fred</b> moves to "Maple St."
</p>
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
<col class="org-left" />
<col class="org-left" />
</colgroup>
<tbody>
<tr>
<td class="org-left">Name</td>
<td class="org-left">Street</td>
</tr>
<tr>
<td class="org-left">fred</td>
<td class="org-left"><del>"Spring St."</del></td>
</tr>
</tbody>
</table>
<p class="fragment roll-in">
Now we've lost information about Fred ever lived on "Spring St."
</p>
</section>
</section>
<section>
<section id="slide-org9f16734">
<h3 id="org9f16734"><b>Facts</b> vs <b>Places</b></h3>
<p>
<b>Place</b> oriented storage
</p>
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
<col class="org-left" />
<col class="org-left" />
</colgroup>
<tbody>
<tr>
<td class="org-left">Name</td>
<td class="org-left">Street</td>
</tr>
<tr>
<td class="org-left">fred</td>
<td class="org-left">"Maple St."</td>
</tr>
</tbody>
</table>
<p class="fragment roll-in">
<b>Facts</b> oriented storage
</p>
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides" class="fragment roll-in">
<colgroup>
<col class="org-left" />
<col class="org-left" />
<col class="org-left" />
<col class="org-left" />
</colgroup>
<tbody>
<tr>
<td class="org-left"><b>fred</b></td>
<td class="org-left">:street</td>
<td class="org-left">"Spring St."</td>
<td class="org-left"><b>T15</b></td>
</tr>
</tbody>
</table>
<p class="fragment roll-in">
<b>fred</b> moves to "Maple St."
</p>
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides" class="fragment roll-in">
<colgroup>
<col class="org-left" />
<col class="org-left" />
<col class="org-left" />
<col class="org-left" />
</colgroup>
<tbody>
<tr>
<td class="org-left"><b>fred</b></td>
<td class="org-left">:street</td>
<td class="org-left">"Maple St."</td>
<td class="org-left"><b>T36</b></td>
</tr>
</tbody>
</table>
</section>
</section>
<section>
<section id="slide-org4f9fdba">
<h2 id="org4f9fdba"><i>Simple</i> Architecture</h2>
<pre class="example">
+----------------------------------------------------------------------------+
| +------------------------------------------------------------------------+ |
| | Peer Application Process | |
| +-------+--------------+-------------+------------------+----------------+ |
| | ^ ^ ^ |
| | | D| | |
| | | a| | |
| | | t| | |
| V | a| | |
| +-------+--------------+--------+ | +-------------+----------------+ |
| | Transactor | S| | Memcached Cluster | |
| +--------------+----------------+ e| +-------------+----------------+ |
| | g| ^ |
| | m| | |
| | e| | |
| | t| | |
| V s| | |
| +--------------+---------------------+------------------+----------------+ |
| | Storage Service (JDBC SQL || Cassandra || DynamoDB) | |
| +------------------------------------------------------------------------+ |
+----------------------------------------------------------------------------+
</pre>
<p>
Architecture <a href="http://docs.datomic.com/architecture.html">Overview</a>
</p>
<aside class="notes">
<p>
А иммутабельность позволяет радикально упростить архитекутру работы с данными
</p>
</aside>
</section>
</section>
<section>
<section id="slide-org5c10e96">
<h2 id="org5c10e96">Declarative Logic Programming Language <i>Datalog</i></h2>
<p class="fragment roll-in">
1977 <a href="http://en.wikipedia.org/wiki/Datalog" class="fragment roll-in">Datalog</a> was created
</p>
<p class="fragment roll-in">
Syntactically it is a subset of <b>Prolog</b>
</p>
</section>
</section>
<section>
<section id="slide-org80c14be">
<h3 id="org80c14be">Trivial Query Example</h3>
<p>
Pets shelter database
</p>
<p class="fragment roll-in">
<i>Query</i>: <i>Owner names</i> of <i>dog</i> "Tiny"
</p>
<div class="org-src-container">
<pre class="fragment roll-in">'<span style="color: #4f97d7;">[</span><span style="color: #a45bad;">:find</span> ?owner-name
<span style="color: #a45bad;">:where</span> <span style="color: #bc6ec5;">[</span>?dog <span style="color: #a45bad;">:</span><span style="color: #ce537a; font-weight: bold;">dog</span><span style="color: #b2b2b2; background-color: #292b2e;">/</span><span style="color: #a45bad;">name</span> <span style="color: #2d9574;">"Tiny"</span><span style="color: #bc6ec5;">]</span>
<span style="color: #bc6ec5;">[</span>?owner <span style="color: #a45bad;">:</span><span style="color: #ce537a; font-weight: bold;">owner</span><span style="color: #b2b2b2; background-color: #292b2e;">/</span><span style="color: #a45bad;">dogs</span> ?dog<span style="color: #bc6ec5;">]</span>
<span style="color: #bc6ec5;">[</span>?owner <span style="color: #a45bad;">:</span><span style="color: #ce537a; font-weight: bold;">owner</span><span style="color: #b2b2b2; background-color: #292b2e;">/</span><span style="color: #a45bad;">name</span> ?owner-name<span style="color: #bc6ec5;">]</span><span style="color: #4f97d7;">]</span>
</pre>
</div>
<p>
Example from <a href="http://gigasquidsoftware.com/blog/2015/08/15/conversations-with-datomic/">Conversations With Datomic</a> article by Carin Meier
</p>
</section>
</section>
<section>
<section id="slide-org35d463c">
<h2 id="org35d463c"><b>Datomic</b> <i>Superpowers</i></h2>
<ul>
<li class="fragment appear">Query <i>consistent</i> database value at <i>any moment</i> in time</li>
<li class="fragment appear">Query <i>historic</i> data</li>
<li class="fragment appear">Make <i>speculative</i> <b>What If</b> queries</li>
<li class="fragment appear">Use <i>user defined functions</i> and <i>rules</i> in queries</li>
<li class="fragment appear">Use <i>user defined functions</i> on <b>Transactor</b> for data integrity</li>
<li class="fragment appear">Listen to <i>all changes</i> in the system and <i>react</i></li>
<li class="fragment appear">Lookup <i>indexes</i> directly for speed</li>
<li class="fragment appear">Graph database</li>
<li class="fragment appear">Fulltext search</li>
<li class="fragment appear">InMemory storage for "UNIT" tests!!!</li>
</ul>
</section>
</section>
<section>
<section id="slide-orgf71e422">
<h2 id="orgf71e422"><b>XTDB</b> <i>Superpowers</i></h2>
<ul>
<li class="fragment appear">Bitemporal quieries on transaction time and valid time</li>
<li class="fragment appear">Schema on read, schemaless on write</li>
<li class="fragment appear">EDN database</li>
<li class="fragment appear">Open Source (MIT Licenced)</li>
<li class="fragment appear">Distributed with all data on each node</li>
</ul>
</section>
</section>
<section>
<section id="slide-org1aea0e7">
<h2 id="org1aea0e7"><i>Incidental complexity</i> sources</h2>
<ul>
<li class="fragment appear">Data <i>Persistence</i></li>
<li class="fragment appear">Cache Invalidation</li>
<li class="fragment appear"><b>ETL</b> from <b>OLTP</b> to <b>OLAP</b></li>
<li class="fragment appear">Integration (Not so much you can do about that)</li>
<li class="fragment appear"><b>SPA</b> <i>Stateful</i> Client</li>
<li class="fragment appear"><b>DB</b> related <i>Concurrency</i></li>
<li class="fragment appear">Scaling writes and reads separately</li>
</ul>
</section>
</section>
<section>
<section id="slide-org214697c">
<h3 id="org214697c"><i>Disease</i> -> <b>Datomic</b> <i>Treatment</i></h3>
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides" class="fragment roll-in">
<colgroup>
<col class="org-left" />
<col class="org-left" />
</colgroup>
<tbody>
<tr>
<td class="org-left">Impedance Mismatch</td>
<td class="org-left">-> <a href="http://docs.datomic.com/pull.html">Pull API</a></td>
</tr>
<tr>
<td class="org-left"><a href="https://martinfowler.com/bliki/TwoHardThings.html">Cache Invalidation</a></td>
<td class="org-left">-> <a href="http://docs.datomic.com/architecture.html">Immutability</a></td>
</tr>
<tr>
<td class="org-left"><i>DB</i> related <i>Concurrency</i></td>
<td class="org-left">-> <a href="http://augustl.com/blog/2016/datomic_the_most_innovative_db_youve_never_heard_of">Single Threaded Writes</a></td>
</tr>
<tr>
<td class="org-left"><i>ETL</i> from <i>OLTP</i> to <i>OLAP</i></td>
<td class="org-left">-> <a href="http://docs.datomic.com/clojure/">as-of, since, history</a></td>
</tr>
<tr>
<td class="org-left">Integration ( <a href="https://martinfowler.com/articles/microservices.html">"Microservices"</a> )</td>
<td class="org-left">-> <a href="http://docs.datomic.com/project-setup.html">Client</a>, <a href="http://docs.datomic.com/rest.html">REST</a>, <a href="https://github.com/cognitect-labs/vase">Vase</a></td>
</tr>
<tr>
<td class="org-left"><i>SPA</i> Client <i>State Management</i></td>
<td class="org-left">-> <a href="http://docs.datomic.com/rest.html">REST SSE</a>, <a href="https://github.com/tonsky/datascript">DataScript</a></td>
</tr>
<tr>
<td class="org-left"><a href="https://www.infoq.com/presentations/Simulation-Testing">Simulation Testing</a></td>
<td class="org-left">-> <a href="https://github.com/Datomic/simulant">Simulant</a></td>
</tr>
<tr>
<td class="org-left">Scaling writes/reads separately</td>
<td class="org-left">-> <a href="https://docs.datomic.com/on-prem/architecture.html">Datomic Architecture</a></td>
</tr>
</tbody>
</table>
<p class="fragment roll-in">
<i>Datomic</i> <a href="http://docs.datomic.com/rest.html" class="fragment roll-in">REST API</a> works but considered legacy
</p>
<aside class="notes">
<ul>
<li>Интеграция. Datomic REST API интеграция как с белым ящиком, в том числе реактивная</li>
</ul>
<p>
Vase позволяет строить RESTful API полностью декларативно для данных в Datomic Интеграция как с "чёрным" ящиком
<a href="https://github.com/cognitect-labs/vase">https://github.com/cognitect-labs/vase</a>
<a href="https://github.com/cognitect-labs/vase/blob/master/docs/your_first_api.md">https://github.com/cognitect-labs/vase/blob/master/docs/your_first_api.md</a>
</p>
<ul>
<li>Concurrency. Multithreaded Databases тратят только 25% времени на запись и чтение данных. Остальное время они тратят на координацию паральных читателей и писателей.</li>
</ul>
<p>
SingleThreaded Transactor всё время тратит на запись данных. Нет проблем Concurrency вообще.
Он все приходящие на него транзакции кладёт в очередь и по одному вытаскивает и записывает.
Причём если приходит слишком много Datom-ов он переходит в Throttling режим и работает медленнее.
</p>
</aside>
</section>
</section>
<section>
<section id="slide-org5ac72f1">
<h2 id="org5ac72f1">Why is it worth investing</h2>
<div class="outline-text-2" id="text-org5ac72f1">
</div>
</section>
</section>
<section>
<section id="slide-org07530b2">
<h3 id="org07530b2"><b>Datomic</b> reflects the way you think of information</h3>
<p class="fragment (appear)">
That's why it is the best choice to implement your own ideas and projects.
</p>
<p class="fragment (appear)">
No incidental complexity, no restrictions, no crutches, no pain.
</p>
<p class="fragment (appear)">
In fact you have <a href="https://martinfowler.com/eaaDev/EventSourcing.html" class="fragment (appear)">Event Sourcing</a> and <a href="https://martinfowler.com/bliki/CQRS.html">CQRS</a> with no cost.
</p>
<p class="fragment (appear)">
<a href="https://martinfowler.com/eaaDev/EventSourcing.html" class="fragment (appear)">Event Sourcing</a> pattern is just <i>a crutch</i> for an outdated <i>place oriented</i> data model.
</p>
</section>
</section>
<section>
<section id="slide-orgb45ff9a">
<h3 id="orgb45ff9a"><b>Datomic</b> saves all historic data</h3>
<p class="fragment (appear)">
If <i>data</i> worth saving, all <i>historic data</i> worth saving as well.
</p>
<p class="fragment (appear)">
You will do it anyway in <b>OLAP</b> database.
</p>
<p class="fragment (appear)">
<a href="http://docs.datomic.com/capacity.html" class="fragment (appear)">Capacity Planning</a>
</p>
</section>
</section>
<section>
<section id="slide-org503a80b">
<h3 id="org503a80b"><b>Datomic</b> downloads hot dataset in memory</h3>
<p class="fragment (appear)">
Any business application downloads hot dataset in memory
</p>
<p class="fragment (appear)">
But <b>Datomic</b> doing it smarter, giving you a lot of benefits
</p>
</section>
</section>
<section>
<section id="slide-orgb702f1e">
<h3 id="orgb702f1e"><b>Datomic</b> is a proprietary software</h3>
<p class="fragment (appear)">
And always gonna <a href="https://soundcloud.com/defn-771544745/23-the-right-honourable-stuart-halloway" class="fragment (appear)">be closed source</a>
</p>
<p class="fragment (appear)">
But it was developed by <b>Rich Hickey</b> and <b>Stuart Halloway</b>
</p>
<p class="fragment (appear)">
And it is totally <a href="http://www.datomic.com/get-datomic.html" class="fragment (appear)">free</a> for one year of updates
</p>
<p class="fragment (appear)">
If you are using proprietary <b>DBs</b> for <b>OLTP</b>, <b>ETL</b> and <b>OLAP</b>
</p>
<p class="fragment (appear)">
You can <a href="http://www.datomic.com/get-datomic.html" class="fragment (appear)">afford</a> using <b>Datomic</b>
</p>
<p class="fragment (appear)">
Or consider using <b>XTDB</b>
</p>
</section>
</section>
<section>
<section id="slide-org98f195d">
<h2 id="org98f195d"><b>Datomic</b> for non <b>Clojure</b></h2>
<p class="fragment (appear)">
Even thogh <b>Clojure</b> language was created to build <b>Datomic</b>
</p>
<p class="fragment (appear)">
<b>Datomic</b> supports all <b>JVM</b> languages
</p>
<p class="fragment (appear)">
Non <b>JVM</b> languages supported via <b>REST API</b>
</p>
</section>
</section>
<section>
<section id="slide-org725bd21">
<h2 id="org725bd21"><b>Datalog</b> is <i>orthogonal</i> to <b>facts</b> model</h2>
<p class="fragment roll-in">
<b>Datalog</b> is applicable for any <i>structured data</i> processing.
</p>
<p class="fragment roll-in">
But <b>Datomic</b> uses <b>Datalog</b> to process <i>Facts</i> (<b>Datoms</b>).
</p>
<p class="fragment roll-in">
If you don't need history and only need to make requests for application state you can use <i>Open Source</i> <b>Datalog</b> implementation <a href="https://github.com/tonsky/datascript" class="fragment roll-in">DataScript</a>
</p>
</section>
</section>
<section>
<section id="slide-orgd8c3091">
<h3 id="orgd8c3091">Some <b>DataScript</b> Use Cases</h3>
<p class="fragment roll-in">
For example, you can use <b>DataScript</b> to:
</p>
<ul>
<li class="fragment appear">Store and query <i>Single Page Application's</i> <i>State</i></li>
<li class="fragment appear">Statically generate site from <i>Knowledge Base</i> on <b>DataScript</b></li>
</ul>
</section>
</section>
<section>
<section id="slide-orgdf1af0e">
<h2 id="orgdf1af0e">Summary</h2>
<p>
I want to inspire people to:
</p>
<ul>
<li class="fragment appear">Consider <i>ideas</i> <b>Datomic</b> based on</li>
<li class="fragment appear">Learn <b>Datomic</b> or <b>XTDB</b> and <b>Datalog</b></li>
<li class="fragment appear">Use <b>Datomic</b>, <b>XTDB</b> and <b>DataScript</b> for <i>pet projects</i> and ambitious <i>production</i></li>
<li class="fragment appear">Develop <b>job market</b> without data related <i>incidental complexity</i></li>
<li class="fragment appear">Quit tolerate unnecessary <i>incidental complexity</i></li>
</ul>
</section>
</section>
<section>
<section id="slide-org8b974e5">
<h2 id="org8b974e5">Learn <b>Datomic</b></h2>
<p class="fragment roll-in">
Videos from <a href="http://clojurecourse.by/" class="fragment roll-in">ClojureCourse.by</a> by <a href="https://github.com/tonsky">Nikita Prokopov</a>
</p>
<p class="fragment roll-in">
Interactive course <a href="http://www.learndatalogtoday.org/" class="fragment roll-in">Learn Datalog Today</a>
</p>
<p class="fragment roll-in">
Articles by Carin Meyer <a href="http://gigasquidsoftware.com/blog/2015/08/15/conversations-with-datomic/" class="fragment roll-in">Conversations With Datomic</a>
</p>
<p class="fragment roll-in">
Great <a href="http://blog.datomic.com/" class="fragment roll-in">Datomic Blog</a> and <a href="http://docs.datomic.com/tutorial.html">Documentation</a>
</p>
</section>
</section>
<section>
<section id="slide-org98b20c0">
<h2 id="org98b20c0">Learn <b>XTDB</b></h2>
<p class="fragment roll-in">
<a href="https://nextjournal.com/xtdb-tutorial/start" class="fragment roll-in">https://nextjournal.com/xtdb-tutorial/start</a>
</p>
</section>
</section>
<section>
<section id="slide-orge4ac7c6">
<h2 id="orge4ac7c6">Acknowledgments</h2>
<p>
<b>Николай Рыжиков</b> - за знакомство с <i>Datomic</i> и <i>Clojure</i> <a href="https://plus.google.com/u/0/+%D0%9D%D0%B8%D0%BA%D0%BE%D0%BB%D0%B0%D0%B9%D0%A0%D1%8B%D0%B6%D0%B8%D0%BA%D0%BE%D0%B2/posts/br5A7HMEXY5">в 2013</a>, знакомство с <a href="https://github.com/hakimel/reveal.js/">Reveal.js</a> и название доклада
</p>
<p>
<b>Никита Прокопов</b> - за преподавание на <a href="http://clojurecourse.by/">ClojureCource.by</a> в 2014 и <i>Open Source</i> <a href="https://github.com/tonsky/datascript">DataScript</a> и <a href="https://github.com/tonsky/rum">RUM</a>
</p>
<p>
<b>Сергей Ткаченко</b> - за <a href="https://www.meetup.com/Moscow-Clojure-Script-Meetup/">Moscow Clojure/CLJS Meetup</a> и приглашение сделать доклад
</p>
<p>
<b>Rich Hickey</b> - за <a href="https://clojure.org/">Clojure</a> и <a href="http://www.datomic.com/">Datomic</a>
</p>
<p>
<b>Stuart Halloway</b> - За <a href="http://www.datomic.com/">Datomic</a>, <a href="https://github.com/Datomic/simulant">Simulant</a> и мою первую прочитанную книгу по Clojure <a href="https://pragprog.com/book/shcloj2/programming-clojure">Programing Clojure</a>
</p>
<p>
<a href="https://www.gnu.org/software/emacs/">GNU Emacs</a>, <a href="http://orgmode.org/">Org Mode</a>, <a href="https://github.com/yjwen/org-reveal">Org-Reveal</a>, <a href="http://cinsk.github.io//emacs/emacs-artist.html">Artist Mode</a>, <a href="https://github.com/bbatsov/prelude">Prelude</a>
</p>
</section>
</section>
<section>
<section id="slide-org06bfd8a">
<h2 id="org06bfd8a">Links</h2>
<p>
<a href="https://soundcloud.com/defn-771544745/23-the-right-honourable-stuart-halloway">Defn Episode 23</a> with <b>Stuart Halloway</b> about history of <i>Cognitect</i> and <i>Datomic</i> past and future
</p>
<p>
<a href="http://blog.cognitect.com/cognicast/059-michael-nygard?rq=simulant">Cognicast Episode 059</a> With <b>Michael Nygard</b> about <i>simulation testing</i>
</p>
<p>
<a href="http://blog.cognitect.com/cognicast/101?rq=arachne">Cognicast Episode 101</a> With <b>Luke Vanderhart</b> about <i>Arachne</i> web framework wich uses <i>Dataomic</i> in memory database for components configuration
</p>
<p>
<a href="http://blog.cognitect.com/cognicast/118">Cognicast Episode 118</a> with <b>Paul deGrandis</b> about <i>Vase</i> data-driven <i>microservices</i> library
</p>
</section>
</section>
<section>
<section id="slide-orgc9f0c35">
<h2 id="orgc9f0c35">Thanks</h2>
</section>
</section>
<section>
<section id="slide-org1adb94f">
<h2 id="org1adb94f"><b>Questions</b> and <b>Additions</b></h2>
</section>
</section>
</div>
</div>
<p> Created by Alexander Petrov (a.k.a Lysenko). </p>
<script src="./reveal.js/lib/js/head.min.js"></script>
<script src="./reveal.js/js/reveal.js"></script>
<script>
// Full list of configuration options available here:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: false,
center: true,
slideNumber: 'c/t',
rollingLinks: true,
keyboard: true,
mouseWheel: false,
fragmentInURL: false,
hashOneBasedIndex: false,
pdfSeparateFragments: true,
overview: true,
width: 1200,
height: 800,
margin: 0.10,
minScale: 0.50,
maxScale: 2.50,
theme: Reveal.getQueryHash().theme, // available themes are in /css/theme
transition: Reveal.getQueryHash().transition || 'cube', // see README of reveal.js for options
transitionSpeed: 'default',
// Optional libraries used to extend reveal.js
dependencies: [
{ src: './reveal.js/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: './reveal.js/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: './reveal.js/plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } }]
});
</script>
</body>
</html>