AnalyticsCatalogConfiguration

@Configuration(proxyBeanMethods = false)
@EnableConfigurationProperties(value = [AnalyticsCatalogProperties::class])
class AnalyticsCatalogConfiguration

The analytics catalog's beans: who calls it and what each caller may send or read, and the catalog's ports.

  • Who calls it: CoSec's callers, from the identity the CoSec gateway verified and forwarded (the cosec profile, CoSec's gateway mode reading CoSec-Identity); in development without CoSec, the host's, from the Wow-* identity headers any client sets (DevelopmentCallerResolver), of which a request without a user is no caller here (requireSignedInCaller): it is answered 401, as behind the gateway. A node outside development without CoSec does not start.

  • What each may send: AnalyticsCatalogAuthorizer, by role, or CoSec's policies when CoSec decides the requests itself (its AuthorizationChecker) and wow.cosec.authorizer.enabled is on; what each may read: AnalyticsCatalogReaderRole.

  • The ClickHouse client: one client of wow.clickhouse.endpoint and its credentials (ClickHouseClients) the catalog, its datasets' warehouse, and the host's Sink and dataset backend share, closed with the context.

  • The catalog: the WarehouseCatalog of the ClickHouse server that client reaches, over wow.analytics.catalog.databases (wow.clickhouse.database when none), or WarehouseCatalog.NONE without one; the TrustedWriters of wow.analytics.catalog.trusted-writers; the KnownAggregates of the sources' snapshots; the DatasetSources a dataset's definition is checked against, the sources' latest states; and the CatalogWatcher that syncs what changed every wow.analytics.catalog.refresh-interval, unless wow.analytics.catalog.watch.enabled=false.

  • The datasets (-2): the DatasetWarehouse their versions' views are created in, on the same ClickHouse server (DatasetWarehouse.NONE without one), the DatasetPolicy of wow.analytics.catalog.datasets.*, and, unless wow.analytics.catalog.datasets.serving.enabled=false, the DatasetPublicationWatcher that serves the published versions on this node, with its readiness (datasetPublications, out of service until its first read) and its metrics (wow.analytics.catalog.datasets.sync.age, wow.analytics.catalog.datasets.publication.lag, seconds).

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Who sends what: steps aside when CoSec decides (CoSecCommandAuthorizer, its policies alone, this one then having no objection); otherwise the catalog's roles decide (AnalyticsCatalogAuthorizer).

Link copied to clipboard
@Bean(destroyMethod = "close")
@ConditionalOnProperty(prefix = "wow.clickhouse", name = ["endpoint"])
fun analyticsCatalogClickHouseClient(environment: Environment): Client

The service's one ClickHouse client, of wow.clickhouse.* as the Sink and the dataset backend read it: they use it rather than each opening its own, and never close it; the context closes it.

Link copied to clipboard

GET /analytics-catalog/settings: what a console offers depends on (CatalogSettings), the roles deciding as analyticsCatalogAuthorizer has them decide.

Link copied to clipboard
@Bean
@ConditionalOnProperty(prefix = "wow.analytics.catalog", name = ["watch.enabled"], matchIfMissing = true)
fun catalogWatcher(catalog: WarehouseCatalog, commands: ObjectProvider<CommandClient>, properties: AnalyticsCatalogProperties, queries: ObjectProvider<NodeQueryApi>): CatalogWatcher
Link copied to clipboard
Link copied to clipboard
@Bean
@ConditionalOnProperty(prefix = "wow.analytics.catalog.datasets", name = ["serving.enabled"], matchIfMissing = true)
fun datasetPublicationsHealthIndicator(watcher: DatasetPublicationWatcher): HealthIndicator

datasetPublications: out of service until the node read the datasets' publications once.

Link copied to clipboard
@Bean
@ConditionalOnProperty(prefix = "wow.analytics.catalog.datasets", name = ["serving.enabled"], matchIfMissing = true)
fun datasetPublicationWatcher(queries: ObjectProvider<NodeQueryApi>, datasets: QueryDatasets, properties: AnalyticsCatalogProperties, meters: ObjectProvider<MeterRegistry>): DatasetPublicationWatcher
Link copied to clipboard
@Bean
fun datasetReferenceActions(queries: ObjectProvider<NodeQueryApi>, client: ObjectProvider<WowClient>, wow: WowProperties): DatasetReferenceActions

The reference actions of the datasets' rows: the commands of the peers wow.peers describes by their Manifest (contract: manifest), read with the service's WowClient in wow.peer.mode, and sent as the caller through the node's CommandClient, each context in its own mode: the context's service routes, the edge mounts them from the Manifest.

Link copied to clipboard
@Bean
fun datasetSources(queries: ObjectProvider<NodeQueryApi>): DatasetSources
Link copied to clipboard
@Bean
fun datasetWarehouse(client: ObjectProvider<Client>): DatasetWarehouse
Link copied to clipboard
@Bean
fun knownAggregates(queries: ObjectProvider<NodeQueryApi>): KnownAggregates
Link copied to clipboard
Link copied to clipboard
@Bean
fun warehouseCatalog(client: ObjectProvider<Client>, properties: AnalyticsCatalogProperties, environment: Environment): WarehouseCatalog

The warehouse catalog: over databases, else wow.clickhouse.database, its one reader.