Skip to content

Commit 25a0346

Browse files
authored
docs: target system and some audit store (#72)
1 parent 96ec7f1 commit 25a0346

28 files changed

+1591
-1402
lines changed

docs/audit-stores/_category_.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"label": "Audit stores",
3+
"position": 6
4+
}
File renamed without changes.
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
---
2+
title: Couchbase
3+
sidebar_position: 5
4+
---
5+
6+
import Tabs from '@theme/Tabs';
7+
import TabItem from '@theme/TabItem';
8+
9+
# Couchbase Audit Store
10+
11+
This page explains how to configure **Couchbase** as Flamingock's audit store in the **Community Edition**.
12+
The audit store is where Flamingock records execution history and ensures safe coordination across distributed deployments.
13+
14+
> For a conceptual explanation of the audit store vs target systems, see [Audit store vs target system](../overview/audit-store-vs-target-system.md).
15+
16+
---
17+
18+
## Minimum setup
19+
20+
To use Couchbase as your audit store you need to provide:
21+
- A **Cluster**
22+
- A **Bucket**
23+
24+
That's all. Flamingock will take care of collections, indexes, and scope defaults.
25+
26+
Example:
27+
28+
```java
29+
import com.couchbase.client.java.Cluster;
30+
import com.couchbase.client.java.Bucket;
31+
import io.flamingock.core.Flamingock;
32+
import io.flamingock.community.audit.CouchbaseSyncAuditStore;
33+
34+
public class App {
35+
public static void main(String[] args) {
36+
Cluster cluster = Cluster.connect("localhost", "username", "password");
37+
Bucket bucket = cluster.bucket("audit-bucket");
38+
39+
Flamingock.builder()
40+
.setAuditStore(new CouchbaseSyncAuditStore()
41+
.withCluster(cluster)
42+
.withBucket(bucket))
43+
.build()
44+
.run();
45+
}
46+
}
47+
```
48+
49+
---
50+
51+
## Supported versions
52+
53+
| Couchbase SDK | Couchbase Server | Support level |
54+
|--------------------------------|------------------|-----------------|
55+
| `java-client` 3.6.0+ | 7.0+ | Full support |
56+
57+
---
58+
59+
## Dependencies
60+
61+
<Tabs groupId="build_tool">
62+
63+
<TabItem value="gradle" label="Gradle">
64+
65+
```kotlin
66+
implementation(platform("io.flamingock:flamingock-community-bom:$flamingockVersion"))
67+
implementation("io.flamingock:flamingock-community")
68+
69+
// Couchbase SDK (if not already present)
70+
implementation("com.couchbase.client:java-client:3.7.0")
71+
```
72+
73+
</TabItem>
74+
75+
<TabItem value="maven" label="Maven">
76+
77+
```xml
78+
<dependencyManagement>
79+
<dependencies>
80+
<dependency>
81+
<groupId>io.flamingock</groupId>
82+
<artifactId>flamingock-community-bom</artifactId>
83+
<version>${flamingock.version}</version>
84+
<type>pom</type>
85+
<scope>import</scope>
86+
</dependency>
87+
</dependencies>
88+
</dependencyManagement>
89+
90+
<dependency>
91+
<groupId>io.flamingock</groupId>
92+
<artifactId>flamingock-community</artifactId>
93+
</dependency>
94+
95+
<!-- Couchbase SDK (if not already present) -->
96+
<dependency>
97+
<groupId>com.couchbase.client</groupId>
98+
<artifactId>java-client</artifactId>
99+
<version>3.7.0</version>
100+
</dependency>
101+
```
102+
103+
</TabItem>
104+
105+
</Tabs>
106+
107+
---
108+
109+
## Configuration options
110+
111+
Couchbase audit store works out of the box with production-ready defaults.
112+
Optional properties let you tune behavior if needed:
113+
114+
| Property | Default | Description |
115+
|---------------------------------|------------------------|-------------------------------------------------------|
116+
| `couchbase.autoCreate` | `true` | Auto-create collections and indexes. |
117+
| `couchbase.scopeName` | `_default` | Scope where audit collections will be created. |
118+
| `couchbase.auditRepositoryName` | `flamingockAuditLogs` | Collection name for audit entries. |
119+
| `couchbase.lockRepositoryName` | `flamingockLocks` | Collection name for distributed locks. |
120+
121+
Example overriding defaults:
122+
123+
```java
124+
Flamingock.builder()
125+
.setAuditStore(new CouchbaseSyncAuditStore()
126+
.withCluster(cluster)
127+
.withBucket(bucket)
128+
.withProperty("couchbase.scopeName", "custom-scope")
129+
.withProperty("couchbase.autoCreate", true))
130+
.build()
131+
.run();
132+
```
133+
134+
⚠️ **Warning**: Ensure your Couchbase user has permissions to create collections if `autoCreate` is enabled.
135+
136+
---
137+
138+
## Next steps
139+
140+
- Learn about [Target systems](../flamingock-library-config/target-system-configuration.md)
141+
- 👉 See a [full example project](https://github.com/flamingock/flamingock-examples/tree/master/couchbase)
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
---
2+
title: DynamoDB
3+
sidebar_position: 4
4+
---
5+
6+
import Tabs from '@theme/Tabs';
7+
import TabItem from '@theme/TabItem';
8+
9+
# DynamoDB Audit Store
10+
11+
This page explains how to configure **Amazon DynamoDB** as Flamingock's audit store in the **Community Edition**.
12+
The audit store is where Flamingock records execution history and ensures safe coordination across distributed deployments.
13+
14+
> For a conceptual explanation of the audit store vs target systems, see [Audit store vs target system](../overview/audit-store-vs-target-system.md).
15+
16+
---
17+
18+
## Minimum setup
19+
20+
To use DynamoDB as your audit store you need to provide:
21+
- A **DynamoDbClient**
22+
23+
That's all. Flamingock will take care of tables, indexes, and capacity defaults.
24+
25+
Example:
26+
27+
```java
28+
import software.amazon.awssdk.regions.Region;
29+
import software.amazon.awssdk.services.dynamodb.DynamoDbClient;
30+
import io.flamingock.core.Flamingock;
31+
import io.flamingock.community.audit.DynamoSyncAuditStore;
32+
33+
public class App {
34+
public static void main(String[] args) {
35+
DynamoDbClient client = DynamoDbClient.builder()
36+
.region(Region.US_EAST_1)
37+
.build();
38+
39+
Flamingock.builder()
40+
.setAuditStore(new DynamoSyncAuditStore()
41+
.withClient(client))
42+
.build()
43+
.run();
44+
}
45+
}
46+
```
47+
48+
---
49+
50+
## Supported versions
51+
52+
| AWS SDK | DynamoDB | Support level |
53+
|--------------------------------|----------------|-----------------|
54+
| `dynamodb` 2.25.29+ | All versions | Full support |
55+
56+
---
57+
58+
## Dependencies
59+
60+
<Tabs groupId="build_tool">
61+
62+
<TabItem value="gradle" label="Gradle">
63+
64+
```kotlin
65+
implementation(platform("io.flamingock:flamingock-community-bom:$flamingockVersion"))
66+
implementation("io.flamingock:flamingock-community")
67+
68+
// AWS SDK (if not already present)
69+
implementation("software.amazon.awssdk:dynamodb:2.28.0")
70+
implementation("software.amazon.awssdk:dynamodb-enhanced:2.28.0")
71+
```
72+
73+
</TabItem>
74+
75+
<TabItem value="maven" label="Maven">
76+
77+
```xml
78+
<dependencyManagement>
79+
<dependencies>
80+
<dependency>
81+
<groupId>io.flamingock</groupId>
82+
<artifactId>flamingock-community-bom</artifactId>
83+
<version>${flamingock.version}</version>
84+
<type>pom</type>
85+
<scope>import</scope>
86+
</dependency>
87+
</dependencies>
88+
</dependencyManagement>
89+
90+
<dependency>
91+
<groupId>io.flamingock</groupId>
92+
<artifactId>flamingock-community</artifactId>
93+
</dependency>
94+
95+
<!-- AWS SDK (if not already present) -->
96+
<dependency>
97+
<groupId>software.amazon.awssdk</groupId>
98+
<artifactId>dynamodb</artifactId>
99+
<version>2.28.0</version>
100+
</dependency>
101+
<dependency>
102+
<groupId>software.amazon.awssdk</groupId>
103+
<artifactId>dynamodb-enhanced</artifactId>
104+
<version>2.28.0</version>
105+
</dependency>
106+
```
107+
108+
</TabItem>
109+
110+
</Tabs>
111+
112+
---
113+
114+
## Configuration options
115+
116+
DynamoDB audit store works out of the box with production-ready defaults.
117+
Optional properties let you tune behavior if needed:
118+
119+
| Property | Default | Description |
120+
|---------------------------------|------------------------|------------------------------------------------------------------|
121+
| `dynamodb.autoCreate` | `true` | Auto-create tables if they don't exist. |
122+
| `dynamodb.readCapacityUnits` | `5` | Read capacity units (PROVISIONED mode only). |
123+
| `dynamodb.writeCapacityUnits` | `5` | Write capacity units (PROVISIONED mode only). |
124+
| `dynamodb.auditRepositoryName` | `flamingockAuditLogs` | Table name for audit entries. |
125+
| `dynamodb.lockRepositoryName` | `flamingockLocks` | Table name for distributed locks. |
126+
127+
Example overriding defaults:
128+
129+
```java
130+
Flamingock.builder()
131+
.setAuditStore(new DynamoSyncAuditStore()
132+
.withClient(client)
133+
.withProperty("dynamodb.readCapacityUnits", 10)
134+
.withProperty("dynamodb.writeCapacityUnits", 10))
135+
.build()
136+
.run();
137+
```
138+
139+
⚠️ **Warning**: Adjust capacity units based on your workload. Under-provisioning may cause throttling.
140+
Consider using **ON_DEMAND** billing mode for unpredictable workloads.
141+
142+
---
143+
144+
## Next steps
145+
146+
- Learn about [Target systems](../flamingock-library-config/target-system-configuration.md)
147+
- 👉 See a [full example project](https://github.com/flamingock/flamingock-examples/tree/master/dynamodb)

0 commit comments

Comments
 (0)