-
Notifications
You must be signed in to change notification settings - Fork 18
/
blaze.edn
737 lines (641 loc) · 26.3 KB
/
blaze.edn
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
;;
;; This file contains the configuration of Blaze components forming a system.
;;
;; The two main sections are the :base-config and the :features, were
;; :base-config contains mandatory components and :features contains optional
;; components which are enabled based on feature flags.
;;
;; Each config entry consists of a component key like :blaze/rest-api and a
;; component config map. Component keys follow the namespaces the components are
;; defined in. The corresponding namespaces will be loaded automatically before
;; the system is initialized. Component config maps can contain normal values
;; and references to other components. The reader tag #blaze/ref is used to
;; specify a reference. Keys in references can be component keys itself or super
;; keys like :blaze.db/index-kv-store which are provided by concrete components.
;;
{:base-config
{
;;
;; FHIR RESTful API
;;
;; Provides the FHIR RESTful API which is the public interface of Blaze. The
;; namespace blaze/rest-api can be found in the rest-api module. The rest-api
;; depends on FHIR interactions and operations.
;;
;; Resource patterns offer control over which interactions are enabled for
;; which resource type. The default configuration enables all interactions for
;; all resource types.
;;
:blaze/rest-api
{:search-system-handler #blaze/ref :blaze.interaction/search-system
:transaction-handler #blaze/ref :blaze.interaction/transaction
:history-system-handler #blaze/ref :blaze.interaction.history/system
:resource-patterns
[#:blaze.rest-api.resource-pattern
{:type :default
:interactions
{:read
#:blaze.rest-api.interaction
{:handler #blaze/ref :blaze.interaction/read}
:vread
#:blaze.rest-api.interaction
{:handler #blaze/ref :blaze.interaction/read}
:update
#:blaze.rest-api.interaction
{:handler #blaze/ref :blaze.interaction/update}
:delete
#:blaze.rest-api.interaction
{:handler #blaze/ref :blaze.interaction/delete}
:history-instance
#:blaze.rest-api.interaction
{:handler #blaze/ref :blaze.interaction.history/instance}
:history-type
#:blaze.rest-api.interaction
{:handler #blaze/ref :blaze.interaction.history/type}
:create
#:blaze.rest-api.interaction
{:handler #blaze/ref :blaze.interaction/create}
:search-type
#:blaze.rest-api.interaction
{:handler #blaze/ref :blaze.interaction/search-type}}}]
:compartments
[#:blaze.rest-api.compartment
{:code "Patient"
:search-handler #blaze/ref :blaze.interaction/search-compartment}]
:operations
[#:blaze.rest-api.operation
{:code "evaluate-measure"
:def-uri "http://hl7.org/fhir/OperationDefinition/Measure-evaluate-measure"
:resource-types ["Measure"]
:type-handler #blaze/ref :blaze.fhir.operation.evaluate-measure/handler
:instance-handler #blaze/ref :blaze.fhir.operation.evaluate-measure/handler}
#:blaze.rest-api.operation
{:code "graphql"
:def-uri "http://hl7.org/fhir/OperationDefinition/Resource-graphql"
:resource-types ["Resource"]
:post-middleware #blaze/ref :blaze.fhir.operation.graphql.middleware/query
:response-type :json
:system-handler #blaze/ref :blaze.fhir.operation.graphql/handler}]
:enforce-referential-integrity #blaze/cfg ["ENFORCE_REFERENTIAL_INTEGRITY" boolean? true]}
;;
;; FHIR Interactions
;;
;; FHIR interactions implement most of the RESTful API. There are system, type
;; and instance level interactions. Interactions are referred by the rest-api
;; above. All interactions depend on the database node :blaze.db/node which
;; provides read and write access to the actual resources.
;;
:blaze.interaction.history/system
{:clock #blaze/ref :blaze/clock
:rng-fn #blaze/ref :blaze/rng-fn}
:blaze.interaction.history/type
{:clock #blaze/ref :blaze/clock
:rng-fn #blaze/ref :blaze/rng-fn}
:blaze.interaction.history/instance
{:clock #blaze/ref :blaze/clock
:rng-fn #blaze/ref :blaze/rng-fn}
:blaze.interaction/create
{:node #blaze/ref :blaze.db/node
:executor #blaze/ref :blaze.server/executor
:clock #blaze/ref :blaze/clock
:rng-fn #blaze/ref :blaze/rng-fn}
:blaze.interaction/delete
{:node #blaze/ref :blaze.db/node
:executor #blaze/ref :blaze.server/executor}
:blaze.interaction/read {}
:blaze.interaction/search-system
{:clock #blaze/ref :blaze/clock
:rng-fn #blaze/ref :blaze/rng-fn
:page-store #blaze/ref :blaze/page-store}
:blaze.interaction/search-type
{:clock #blaze/ref :blaze/clock
:rng-fn #blaze/ref :blaze/rng-fn
:page-store #blaze/ref :blaze/page-store}
:blaze.interaction/search-compartment
{:clock #blaze/ref :blaze/clock
:rng-fn #blaze/ref :blaze/rng-fn
:page-store #blaze/ref :blaze/page-store}
:blaze.interaction/transaction
{:node #blaze/ref :blaze.db/node
:executor #blaze/ref :blaze.interaction.transaction/executor
:clock #blaze/ref :blaze/clock
:rng-fn #blaze/ref :blaze/rng-fn}
:blaze.interaction.transaction/executor {}
:blaze.interaction/update
{:node #blaze/ref :blaze.db/node
:executor #blaze/ref :blaze.server/executor}
;;
;; FHIR Operation Evaluate Measure
;;
;; Special operation which enables Blaze to evaluate Measure resources,
;; producing MeasureReports. The operation gets it's own executor with
;; FHIR_OPERATION_EVALUATE_MEASURE_THREADS many threads on order to not occupy
;; regular server threads. The metrics compile-duration-seconds and
;; evaluate-duration-seconds are exported.
;;
:blaze.fhir.operation.evaluate-measure/handler
{:node #blaze/ref :blaze.db/node
:executor #blaze/ref :blaze.fhir.operation.evaluate-measure/executor
:clock #blaze/ref :blaze/clock
:rng-fn #blaze/ref :blaze/rng-fn
:timeout #blaze/ref :blaze.fhir.operation.evaluate-measure/timeout}
:blaze.fhir.operation.evaluate-measure/timeout
{:millis #blaze/cfg ["FHIR_OPERATION_EVALUATE_MEASURE_TIMEOUT" nat-int? 3600000]}
:blaze.fhir.operation.evaluate-measure/executor
{:num-threads #blaze/cfg ["FHIR_OPERATION_EVALUATE_MEASURE_THREADS" pos-int? 4]}
:blaze.fhir.operation.evaluate-measure/compile-duration-seconds {}
:blaze.fhir.operation.evaluate-measure/evaluate-duration-seconds {}
;;
;; FHIR Operation GraphQL
;;
:blaze.fhir.operation.graphql/handler
{:node #blaze/ref :blaze.db/node
:executor #blaze/ref :blaze.fhir.operation.graphql/executor}
:blaze.fhir.operation.graphql/executor
{:num-threads #blaze/cfg ["FHIR_OPERATION_GRAPHQL_THREADS" pos-int? 4]}
:blaze.fhir.operation.graphql.middleware/query {}
;;
;; Database Node
;;
;; The database node offers the implementation of the database which is used
;; by FHIR interactions and operations. The database node depends on:
;;
;; :tx-log - a central transaction log, were all transactions are submitted
;; in order to get replicated to all other nodes
;;
;; :tx-indexer - the local indexer for transactions
;;
;; :resource-cache - an in-memory cache of decoded resources
;;
;; :kv-store - the actual key-value store holding all resources and indices
;;
;; :search-param-registry - a registry of search params used for query
;; functionality
;;
;; The resource cache collector exports metrics of the resource cache.
;;
:blaze.db/node
{:tx-log #blaze/ref :blaze.db/tx-log
:resource-handle-cache #blaze/ref :blaze.db/resource-handle-cache
:tx-cache #blaze/ref :blaze.db/tx-cache
:indexer-executor #blaze/ref :blaze.db.node/indexer-executor
:resource-store #blaze/ref :blaze.db/resource-cache
:kv-store #blaze/ref :blaze.db/index-kv-store
:resource-indexer #blaze/ref :blaze.db.node/resource-indexer
:search-param-registry #blaze/ref :blaze.db/search-param-registry
:enforce-referential-integrity #blaze/cfg ["ENFORCE_REFERENTIAL_INTEGRITY" boolean? true]}
:blaze.db.node/indexer-executor {}
:blaze.db.node/duration-seconds {}
:blaze.db.node/transaction-sizes {}
:blaze.db.node/resource-indexer
{:kv-store #blaze/ref :blaze.db/index-kv-store
:resource-store #blaze/ref :blaze.db/resource-cache
:search-param-registry #blaze/ref :blaze.db/search-param-registry
:executor #blaze/ref :blaze.db.node.resource-indexer/executor}
:blaze.db.node.resource-indexer/executor
{:num-threads #blaze/cfg ["DB_RESOURCE_INDEXER_THREADS" pos-int? 4]}
:blaze.db.node.resource-indexer/duration-seconds {}
:blaze.db.node.resource-indexer/index-entries {}
:blaze.db.node.tx-indexer/duration-seconds {}
:blaze.db/cache-collector
{:caches
{"resource-handle-cache" #blaze/ref :blaze.db/resource-handle-cache
"tx-cache" #blaze/ref :blaze.db/tx-cache
"resource-cache" #blaze/ref :blaze.db/resource-cache}}
;;
;; Resource Handle Cache
;;
;; The resource handle cache holds resource handles keyed by tuples of
;; [tid id t]. It avoids seeks in the ResourceAsOf index.
;;
;; The env var DB_RESOURCE_HANDLE_CACHE_SIZE can be used to specify the
;; maximum number of resource handles, the cache can hold. A resource handle
;; weights in about 200 bytes of memory. Please choose a cache size depending
;; on your use case while monitoring JVM heap size.
;;
:blaze.db/resource-handle-cache
{:max-size #blaze/cfg ["DB_RESOURCE_HANDLE_CACHE_SIZE" nat-int? 100000]}
;;
;; Transaction Cache
;;
;; The transaction cache holds transaction data that currently only consists
;; of the instant at which the transaction happened. Transaction data is keyed
;; by t.
;;
:blaze.db/tx-cache
{:kv-store #blaze/ref :blaze.db/index-kv-store
:max-size #blaze/cfg ["DB_TRANSACTION_CACHE_SIZE" nat-int? 100000]}
;;
;; Resource Cache
;;
;; The resource cache holds already decoded FHIR resources keyed by their
;; content hashes. It speeds up access to resources which are stored in the
;; key-value store in encoded format.
;;
;; The env var DB_RESOURCE_CACHE_SIZE can be used to specify the maximum
;; number of resources, the cache can hold. Please note that the actual memory
;; size used depends on resource sizes. Please choose a cache size depending
;; on your use case while monitoring JVM heap size.
;;
:blaze.db/resource-cache
{:resource-store #blaze/ref :blaze.db/resource-store
:max-size #blaze/cfg ["DB_RESOURCE_CACHE_SIZE" nat-int? 100000]}
;;
;; Search Param Registry
;;
;; The search param registry contains a set of FHIR search parameter
;; definitions which are used for query functionality in the database node.
;; Currently, this implementation holds a fix set of search parameters defined
;; in FHIR R4.
;;
:blaze.db/search-param-registry
{:structure-definition-repo #blaze/ref :blaze.fhir/structure-definition-repo}}
:storage
{:in-memory
{
;;
;; In-Memory, Volatile Index Store
;;
;; In-memory, volatile key-value store implementation for demonstration
;; purposes in case no local directory is available. Can be referred by the
;; super key :blaze.db/index-kv-store.
;;
[:blaze.db.kv/mem :blaze.db/index-kv-store]
{:column-families
{:search-param-value-index nil
:resource-value-index nil
:compartment-search-param-value-index nil
:compartment-resource-type-index nil
:active-search-params nil
:tx-success-index {:reverse-comparator? true}
:tx-error-index nil
:t-by-instant-index {:reverse-comparator? true}
:resource-as-of-index nil
:type-as-of-index nil
:system-as-of-index nil
:type-stats-index nil
:system-stats-index nil}}
;;
;; Local Transaction Log for Single Node Deployments
;;
;; Can be referred by the super key :blaze.db/tx-log. The local transaction
;; log uses a key-value store to persist transactions.
;;
:blaze.db.tx-log/local
{:kv-store #blaze/ref :blaze.db/transaction-kv-store
:clock #blaze/ref :blaze/clock}
:blaze.db.tx-log.local/duration-seconds {}
;;
;; In-Memory, Volatile Transaction Store
;;
;; In-memory, volatile key-value store implementation for demonstration
;; purposes in case no local directory is available. Can be referred by the
;; super key :blaze.db/transaction-kv-store.
;;
[:blaze.db.kv/mem :blaze.db/transaction-kv-store]
{:column-families {}}
;;
;; Key-Value Resource Store
;;
;; Can be referred by the super key :blaze.db/resource-store.
;;
:blaze.db.resource-store/kv
{:kv-store #blaze/ref :blaze.db/resource-kv-store
:executor #blaze/ref :blaze.db.resource-store.kv/executor}
:blaze.db.resource-store.kv/executor
{:num-threads #blaze/cfg ["DB_RESOURCE_STORE_KV_THREADS" pos-int? 4]}
:blaze.db.resource-store.kv/resource-bytes {}
:blaze.db.resource-store.kv/duration-seconds {}
;;
;; In-Memory, Volatile Key-Value Store Resource Store Backend
;;
;; In-memory, volatile key-value store implementation for demonstration
;; purposes in case no local directory is available. Can be referred by the
;; super key :blaze.db/resource-kv-store.
;;
[:blaze.db.kv/mem :blaze.db/resource-kv-store]
{:column-families {}}
;;
;; Local Page Store
;;
;; Can be referred by the super key :blaze.db/resource-store.
;;
:blaze.page-store/local
{:secure-rng #blaze/ref :blaze/secure-rng}}
:standalone
{
;;
;; RocksDB Index Store
;;
[:blaze.db.kv/rocksdb :blaze.db/index-kv-store]
{:dir #blaze/cfg ["INDEX_DB_DIR" string? "index"]
:block-cache #blaze/ref :blaze.db.kv.rocksdb/block-cache
:stats #blaze/ref :blaze.db.index-kv-store/stats
:opts
{:wal-dir #blaze/cfg ["INDEX_DB_WAL_DIR" string? ""]
:max-background-jobs
#blaze/cfg ["DB_MAX_BACKGROUND_JOBS" int? 4]
:compaction-readahead-size
#blaze/cfg ["DB_COMPACTION_READAHEAD_SIZE" int? 0]}
:column-families
{:search-param-value-index
{:write-buffer-size-in-mb 64
:max-bytes-for-level-base-in-mb 512
:target-file-size-base-in-mb 64
:block-size #blaze/cfg ["DB_BLOCK_SIZE" int? 16384]}
:resource-value-index
{:write-buffer-size-in-mb 64
:max-bytes-for-level-base-in-mb 512
:target-file-size-base-in-mb 64
:block-size #blaze/cfg ["DB_BLOCK_SIZE" int? 16384]}
:compartment-search-param-value-index
{:write-buffer-size-in-mb 64
:max-bytes-for-level-base-in-mb 512
:target-file-size-base-in-mb 64
:block-size #blaze/cfg ["DB_BLOCK_SIZE" int? 16384]}
:compartment-resource-type-index
{:write-buffer-size-in-mb 4
:max-bytes-for-level-base-in-mb 16
:target-file-size-base-in-mb 4
:block-size #blaze/cfg ["DB_BLOCK_SIZE" int? 16384]}
:active-search-params
{:block-size #blaze/cfg ["DB_BLOCK_SIZE" int? 16384]}
:tx-success-index
{:write-buffer-size-in-mb 2
:max-bytes-for-level-base-in-mb 8
:target-file-size-base-in-mb 2
:block-size #blaze/cfg ["DB_BLOCK_SIZE" int? 16384]
:reverse-comparator? true}
:tx-error-index
{:write-buffer-size-in-mb 2
:max-bytes-for-level-base-in-mb 8
:target-file-size-base-in-mb 2
:block-size #blaze/cfg ["DB_BLOCK_SIZE" int? 16384]}
:t-by-instant-index
{:write-buffer-size-in-mb 2
:max-bytes-for-level-base-in-mb 8
:target-file-size-base-in-mb 2
:block-size #blaze/cfg ["DB_BLOCK_SIZE" int? 16384]
:reverse-comparator? true}
:resource-as-of-index
{:write-buffer-size-in-mb 8
:max-bytes-for-level-base-in-mb 32
:target-file-size-base-in-mb 8
:block-size #blaze/cfg ["DB_BLOCK_SIZE" int? 16384]}
:type-as-of-index
{:write-buffer-size-in-mb 8
:max-bytes-for-level-base-in-mb 32
:target-file-size-base-in-mb 8
:block-size #blaze/cfg ["DB_BLOCK_SIZE" int? 16384]}
:system-as-of-index
{:write-buffer-size-in-mb 8
:max-bytes-for-level-base-in-mb 32
:target-file-size-base-in-mb 8
:block-size #blaze/cfg ["DB_BLOCK_SIZE" int? 16384]}
:type-stats-index
{:write-buffer-size-in-mb 2
:max-bytes-for-level-base-in-mb 8
:target-file-size-base-in-mb 2
:block-size #blaze/cfg ["DB_BLOCK_SIZE" int? 16384]}
:system-stats-index
{:write-buffer-size-in-mb 2
:max-bytes-for-level-base-in-mb 8
:target-file-size-base-in-mb 2
:block-size #blaze/cfg ["DB_BLOCK_SIZE" int? 16384]}}}
[:blaze.db.kv.rocksdb/stats :blaze.db.index-kv-store/stats] {}
;;
;; Local Transaction Log for Single Node Deployments
;;
;; Can be referred by the super key :blaze.db/tx-log. The local transaction
;; log uses a key-value store to persist transactions.
;;
:blaze.db.tx-log/local
{:kv-store #blaze/ref :blaze.db/transaction-kv-store
:clock #blaze/ref :blaze/clock}
:blaze.db.tx-log.local/duration-seconds {}
;;
;; RocksDB Transaction Store
;;
;; Needed by :blaze.db.tx-log/local.
;;
[:blaze.db.kv/rocksdb :blaze.db/transaction-kv-store]
{:dir #blaze/cfg ["TRANSACTION_DB_DIR" string? "transaction"]
:block-cache #blaze/ref :blaze.db.kv.rocksdb/block-cache
:stats #blaze/ref :blaze.db.transaction-kv-store/stats
:opts
{:wal-dir #blaze/cfg ["TRANSACTION_DB_WAL_DIR" string? ""]
:max-background-jobs #blaze/cfg ["DB_MAX_BACKGROUND_JOBS" int? 4]
:compaction-readahead-size #blaze/cfg ["DB_COMPACTION_READAHEAD_SIZE" int? 0]}
:column-families
{:default
{:write-buffer-size-in-mb 8
:max-bytes-for-level-base-in-mb 32
:target-file-size-base-in-mb 3
:block-size #blaze/cfg ["DB_BLOCK_SIZE" int? 16384]}}}
[:blaze.db.kv.rocksdb/stats :blaze.db.transaction-kv-store/stats] {}
;;
;; Key-Value Resource Store
;;
;; Can be referred by the super key :blaze.db/resource-store.
;;
:blaze.db.resource-store/kv
{:kv-store #blaze/ref :blaze.db/resource-kv-store
:executor #blaze/ref :blaze.db.resource-store.kv/executor}
:blaze.db.resource-store.kv/executor
{:num-threads #blaze/cfg ["DB_RESOURCE_STORE_KV_THREADS" pos-int? 4]}
:blaze.db.resource-store.kv/resource-bytes {}
:blaze.db.resource-store.kv/duration-seconds {}
;;
;; RocksDB Key-Value Store Resource Store Backend
;;
[:blaze.db.kv/rocksdb :blaze.db/resource-kv-store]
{:dir #blaze/cfg ["RESOURCE_DB_DIR" string? "resource"]
:block-cache #blaze/ref :blaze.db.kv.rocksdb/block-cache
:stats #blaze/ref :blaze.db.resource-kv-store/stats
:opts
{:wal-dir #blaze/cfg ["RESOURCE_DB_WAL_DIR" string? ""]
:max-background-jobs #blaze/cfg ["DB_MAX_BACKGROUND_JOBS" int? 4]
:compaction-readahead-size #blaze/cfg ["DB_COMPACTION_READAHEAD_SIZE" int? 0]}
:column-families
{:default
{:write-buffer-size-in-mb 64
:max-bytes-for-level-base-in-mb 256
:target-file-size-base-in-mb 26
;; According to Synthea test data, a resource has an average size of
;; 1300 bytes. So a block with a size of 16 kb will hold about 10
;; resources in average.
:block-size #blaze/cfg ["DB_BLOCK_SIZE" int? 16384]
:bloom-filter? true
:memtable-whole-key-filtering? true
;; every get() in the resource store should be a hit
:optimize-filters-for-hits? true}}}
[:blaze.db.kv.rocksdb/stats :blaze.db.resource-kv-store/stats] {}
:blaze.db.kv.rocksdb/block-cache
{:size-in-mb #blaze/cfg ["DB_BLOCK_CACHE_SIZE" int? 128]}
:blaze.db.kv.rocksdb/env {}
:blaze.db.kv.rocksdb/stats-collector
{:stats
[["index" #blaze/ref :blaze.db.index-kv-store/stats]
["transaction" #blaze/ref :blaze.db.transaction-kv-store/stats]
["resource" #blaze/ref :blaze.db.resource-kv-store/stats]]}
;;
;; Local Page Store
;;
;; Can be referred by the super key :blaze.db/resource-store.
;;
:blaze.page-store/local
{:secure-rng #blaze/ref :blaze/secure-rng}}
:distributed
{
;;
;; RocksDB Index Store
;;
;; Currently the only durable option. Can be referred by the super key
;; :blaze.db/index-kv-store. Will be enabled if a INDEX_DB_DIR is set.
;;
[:blaze.db.kv/rocksdb :blaze.db/index-kv-store]
{:dir #blaze/cfg ["INDEX_DB_DIR" string?]
:block-cache #blaze/ref :blaze.db.kv.rocksdb/block-cache
:stats #blaze/ref :blaze.db.index-kv-store/stats
:opts
{:wal-dir #blaze/cfg ["INDEX_DB_WAL_DIR" string? ""]
:max-background-jobs #blaze/cfg ["DB_MAX_BACKGROUND_JOBS" int? 4]
:compaction-readahead-size #blaze/cfg ["DB_COMPACTION_READAHEAD_SIZE" int? 0]}
:column-families
{:search-param-value-index
{:write-buffer-size-in-mb 64
:max-bytes-for-level-base-in-mb 512
:target-file-size-base-in-mb 64
:block-size #blaze/cfg ["DB_BLOCK_SIZE" int? 16384]}
:resource-value-index
{:write-buffer-size-in-mb 64
:max-bytes-for-level-base-in-mb 512
:target-file-size-base-in-mb 64
:block-size #blaze/cfg ["DB_BLOCK_SIZE" int? 16384]}
:compartment-search-param-value-index
{:write-buffer-size-in-mb 64
:max-bytes-for-level-base-in-mb 512
:target-file-size-base-in-mb 64
:block-size #blaze/cfg ["DB_BLOCK_SIZE" int? 16384]}
:compartment-resource-type-index
{:write-buffer-size-in-mb 4
:max-bytes-for-level-base-in-mb 16
:target-file-size-base-in-mb 4
:block-size #blaze/cfg ["DB_BLOCK_SIZE" int? 16384]}
:active-search-params
{:block-size #blaze/cfg ["DB_BLOCK_SIZE" int? 16384]}
:tx-success-index
{:write-buffer-size-in-mb 2
:max-bytes-for-level-base-in-mb 8
:target-file-size-base-in-mb 2
:block-size #blaze/cfg ["DB_BLOCK_SIZE" int? 16384]
:reverse-comparator? true}
:tx-error-index
{:write-buffer-size-in-mb 2
:max-bytes-for-level-base-in-mb 8
:target-file-size-base-in-mb 2
:block-size #blaze/cfg ["DB_BLOCK_SIZE" int? 16384]}
:t-by-instant-index
{:write-buffer-size-in-mb 2
:max-bytes-for-level-base-in-mb 8
:target-file-size-base-in-mb 2
:block-size #blaze/cfg ["DB_BLOCK_SIZE" int? 16384]
:reverse-comparator? true}
:resource-as-of-index
{:write-buffer-size-in-mb 8
:max-bytes-for-level-base-in-mb 32
:target-file-size-base-in-mb 8
:block-size #blaze/cfg ["DB_BLOCK_SIZE" int? 16384]}
:type-as-of-index
{:write-buffer-size-in-mb 8
:max-bytes-for-level-base-in-mb 32
:target-file-size-base-in-mb 8
:block-size #blaze/cfg ["DB_BLOCK_SIZE" int? 16384]}
:system-as-of-index
{:write-buffer-size-in-mb 8
:max-bytes-for-level-base-in-mb 32
:target-file-size-base-in-mb 8
:block-size #blaze/cfg ["DB_BLOCK_SIZE" int? 16384]}
:type-stats-index
{:write-buffer-size-in-mb 2
:max-bytes-for-level-base-in-mb 8
:target-file-size-base-in-mb 2
:block-size #blaze/cfg ["DB_BLOCK_SIZE" int? 16384]}
:system-stats-index
{:write-buffer-size-in-mb 2
:max-bytes-for-level-base-in-mb 8
:target-file-size-base-in-mb 2
:block-size #blaze/cfg ["DB_BLOCK_SIZE" int? 16384]}}}
:blaze.db.kv.rocksdb/block-cache
{:size-in-mb #blaze/cfg ["DB_BLOCK_CACHE_SIZE" int? 128]}
:blaze.db.kv.rocksdb/env {}
[:blaze.db.kv.rocksdb/stats :blaze.db.index-kv-store/stats] {}
:blaze.db.kv.rocksdb/stats-collector
{:stats
[["index" #blaze/ref :blaze.db.index-kv-store/stats]]}
;;
;; Kafka Transaction Log
;;
:blaze.db.tx-log/kafka
{:bootstrap-servers #blaze/cfg ["DB_KAFKA_BOOTSTRAP_SERVERS" string? "localhost:9092"]
:last-t-executor #blaze/ref :blaze.db.tx-log.kafka/last-t-executor
:max-request-size #blaze/cfg ["DB_KAFKA_MAX_REQUEST_SIZE" nat-int? 1048576]
:compression-type #blaze/cfg ["DB_KAFKA_COMPRESSION_TYPE" string? "snappy"]
:security-protocol #blaze/cfg ["DB_KAFKA_SECURITY_PROTOCOL" string? "PLAINTEXT"]
:ssl-truststore-location #blaze/cfg ["DB_KAFKA_SSL_TRUSTSTORE_LOCATION" string?]
:ssl-truststore-password #blaze/cfg ["DB_KAFKA_SSL_TRUSTSTORE_PASSWORD" string?]
:ssl-keystore-location #blaze/cfg ["DB_KAFKA_SSL_KEYSTORE_LOCATION" string?]
:ssl-keystore-password #blaze/cfg ["DB_KAFKA_SSL_KEYSTORE_PASSWORD" string?]
:ssl-key-password #blaze/cfg ["DB_KAFKA_SSL_KEY_PASSWORD" string?]}
:blaze.db.tx-log.kafka/last-t-executor {}
:blaze.db.tx-log.kafka/duration-seconds {}
;;
;; Cassandra Resource Store
;;
;; Can be referred by the super key :blaze.db/resource-store.
;;
:blaze.db.resource-store/cassandra
{:contact-points #blaze/cfg ["DB_CASSANDRA_CONTACT_POINTS" string? "localhost:9042"]
:username #blaze/cfg ["DB_CASSANDRA_USERNAME" string? "cassandra"]
:password #blaze/cfg ["DB_CASSANDRA_PASSWORD" string? "cassandra"]
:key-space #blaze/cfg ["DB_CASSANDRA_KEY_SPACE" string? "blaze"]
:put-consistency-level #blaze/cfg ["DB_CASSANDRA_PUT_CONSISTENCY_LEVEL" string? "TWO"]
:max-concurrent-requests #blaze/cfg ["DB_CASSANDRA_MAX_CONCURRENT_REQUESTS" nat-int? 1024]
:max-request-queue-size #blaze/cfg ["DB_CASSANDRA_MAX_REQUEST_QUEUE_SIZE" nat-int? 100000]
:request-timeout #blaze/cfg ["DB_CASSANDRA_REQUEST_TIMEOUT" pos-int? 2000]}
:blaze.db.resource-store.cassandra/duration-seconds {}
:blaze.db.resource-store.cassandra/resource-bytes {}
;;
;; Cassandra Page Store
;;
;; Can be referred by the super key :blaze/page-store.
;;
:blaze.page-store/cassandra
{:secure-rng #blaze/ref :blaze/secure-rng
:contact-points #blaze/cfg ["DB_CASSANDRA_CONTACT_POINTS" string? "localhost:9042"]
:username #blaze/cfg ["DB_CASSANDRA_USERNAME" string? "cassandra"]
:password #blaze/cfg ["DB_CASSANDRA_PASSWORD" string? "cassandra"]
:key-space #blaze/cfg ["DB_CASSANDRA_KEY_SPACE" string? "blaze"]
:put-consistency-level #blaze/cfg ["DB_CASSANDRA_PUT_CONSISTENCY_LEVEL" string? "TWO"]
:max-concurrent-requests #blaze/cfg ["DB_CASSANDRA_MAX_CONCURRENT_REQUESTS" nat-int? 1024]
:max-request-queue-size #blaze/cfg ["DB_CASSANDRA_MAX_REQUEST_QUEUE_SIZE" nat-int? 100000]
:request-timeout #blaze/cfg ["DB_CASSANDRA_REQUEST_TIMEOUT" pos-int? 2000]}
:blaze.page-store.cassandra/duration-seconds {}
:blaze.page-store.cassandra/resource-bytes {}}}
:features
[
;;
;; OpenID Authentication
;;
;; Can be referred by the super key :blaze.auth/backend. Will be enabled if an
;; OPENID_PROVIDER_URL is set.
;;
{:name "OpenID Authentication"
:toggle "OPENID_PROVIDER_URL"
:config
{:blaze.openid-auth/backend
{:http-client #blaze/ref :blaze/http-client
:scheduler #blaze/ref :blaze/scheduler
:provider-url #blaze/cfg ["OPENID_PROVIDER_URL" string?]}
:blaze/http-client {}
:blaze/scheduler {}}}]}