Skip to content

Commit 8fc668b

Browse files
committed
docs: audit store clean up
1 parent d356245 commit 8fc668b

File tree

4 files changed

+173
-284
lines changed

4 files changed

+173
-284
lines changed

docs/audit-stores/community/couchbase-audit-store.md

Lines changed: 55 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -8,123 +8,89 @@ import TabItem from '@theme/TabItem';
88

99
# Couchbase Audit Store
1010

11-
This page explains how to configure **Couchbase** as Flamingock's audit store.
12-
The audit store is where Flamingock records execution history and ensures safe coordination across distributed deployments.
11+
The Couchbase audit store (`CouchbaseSyncAuditStore`) enables Flamingock to record execution history and ensure safe coordination across distributed deployments using Couchbase as the storage backend.
1312

1413
> For a conceptual explanation of the audit store vs target systems, see [Audit store vs target system](../../overview/audit-store-vs-target-system.md).
1514
15+
## Version Compatibility
1616

17-
## Minimum setup
17+
| Component | Version Requirement |
18+
|-----------|-------------------|
19+
| Couchbase Java Client | 3.6.0+ |
1820

19-
To use Couchbase as your audit store you need to provide:
20-
- A **Cluster**
21-
- A **Bucket**
21+
Couchbase Java Client 3.6.0+ is required and must be included in your project dependencies.
2222

23-
That's all. Flamingock will take care of collections, indexes, and scope defaults.
23+
## Installation
2424

25-
Example:
25+
Add the Couchbase Java Client dependency to your project:
2626

27-
```java
28-
public class App {
29-
public static void main(String[] args) {
30-
Cluster cluster = Cluster.connect("localhost", "username", "password");
31-
Bucket bucket = cluster.bucket("audit-bucket");
32-
33-
Flamingock.builder()
34-
.setAuditStore(new CouchbaseSyncAuditStore()
35-
.withCluster(cluster)
36-
.withBucket(bucket))
37-
.build()
38-
.run();
39-
}
40-
}
27+
<Tabs groupId="gradle_maven">
28+
<TabItem value="gradle" label="Gradle" default>
29+
```kotlin
30+
implementation("com.couchbase.client:java-client:3.7.0")
4131
```
32+
</TabItem>
33+
<TabItem value="maven" label="Maven">
34+
```xml
35+
<dependency>
36+
<groupId>com.couchbase.client</groupId>
37+
<artifactId>java-client</artifactId>
38+
<version>3.7.0</version> <!-- 3.6.0+ supported -->
39+
</dependency>
40+
```
41+
</TabItem>
42+
</Tabs>
4243

43-
## Dependencies
44-
45-
### Required dependencies
46-
47-
| Dependency | Method | Description |
48-
|------------|--------|-------------|
49-
| `Cluster` | `.withCluster(cluster)` | Couchbase cluster connection - **required** |
50-
| `Bucket` | `.withBucket(bucket)` | Target bucket instance - **required** |
51-
52-
## Reusing target system dependencies
44+
## Basic setup
5345

54-
If you're already using a Couchbase target system, you can reuse its dependencies to avoid duplicating connection configuration:
46+
Configure the audit store:
5547

5648
```java
57-
// Reuse dependencies from existing target system
58-
var couchbaseTargetSystem = new CouchbaseTargetSystem("user-database")
59-
.withCluster(cluster)
60-
.withBucket(bucket);
61-
62-
// Create audit store reusing the same dependencies
63-
var auditStore = CouchbaseSyncAuditStore
64-
.reusingDependenciesFrom(couchbaseTargetSystem);
65-
66-
Flamingock.builder()
67-
.setAuditStore(auditStore)
68-
.addTargetSystems(couchbaseTargetSystem)
69-
.build()
70-
.run();
49+
var auditStore = new CouchbaseSyncAuditStore("audit-store-id", cluster, bucket);
7150
```
7251

52+
The constructor requires the audit store name, Couchbase cluster, and bucket. Optional configurations can be added via `.withXXX()` methods.
7353

74-
## Supported versions
54+
:::info Register Audit Store
55+
Once created, you need to register this audit store with Flamingock using `.setAuditStore(auditStore)` in the builder.
56+
:::
7557

76-
| Couchbase SDK | Couchbase Server | Support level |
77-
|--------------------------------|------------------|-----------------|
78-
| `java-client` 3.6.0+ | 7.0+ | Full support |
58+
## Audit Store Configuration
7959

60+
The Couchbase audit store uses explicit configuration with no global context fallback.
8061

81-
## Dependencies
62+
### Constructor Dependencies (Mandatory)
8263

83-
<Tabs groupId="build_tool">
64+
These dependencies must be provided at audit store creation time with **no global context fallback**:
8465

85-
<TabItem value="gradle" label="Gradle">
66+
| Dependency | Constructor Parameter | Description |
67+
|------------|----------------------|-------------|
68+
| `Cluster` | `cluster` | Couchbase cluster connection - **required** for audit store configuration |
69+
| `Bucket` | `bucket` | Target bucket instance - **required** for storing audit data |
8670

87-
```kotlin
88-
implementation(platform("io.flamingock:flamingock-community-bom:$flamingockVersion"))
89-
implementation("io.flamingock:flamingock-community")
90-
91-
// Couchbase SDK (if not already present)
92-
implementation("com.couchbase.client:java-client:3.7.0")
93-
```
71+
## Configuration example
9472

95-
</TabItem>
73+
Here's a comprehensive example showing the configuration:
9674

97-
<TabItem value="maven" label="Maven">
98-
99-
```xml
100-
<dependencyManagement>
101-
<dependencies>
102-
<dependency>
103-
<groupId>io.flamingock</groupId>
104-
<artifactId>flamingock-community-bom</artifactId>
105-
<version>${flamingock.version}</version>
106-
<type>pom</type>
107-
<scope>import</scope>
108-
</dependency>
109-
</dependencies>
110-
</dependencyManagement>
111-
112-
<dependency>
113-
<groupId>io.flamingock</groupId>
114-
<artifactId>flamingock-community</artifactId>
115-
</dependency>
75+
```java
76+
// Audit store configuration (mandatory via constructor)
77+
var auditStore = new CouchbaseSyncAuditStore("audit-store-id", cluster, bucket)
78+
.withProperty("couchbase.scopeName", "custom-scope") // Optional configuration
79+
.withProperty("couchbase.autoCreate", true); // Optional configuration
11680

117-
<!-- Couchbase SDK (if not already present) -->
118-
<dependency>
119-
<groupId>com.couchbase.client</groupId>
120-
<artifactId>java-client</artifactId>
121-
<version>3.7.0</version>
122-
</dependency>
81+
// Register with Flamingock
82+
Flamingock.builder()
83+
.setAuditStore(auditStore)
84+
.addTargetSystems(targetSystems...)
85+
.build();
12386
```
12487

125-
</TabItem>
88+
**Audit store configuration resolution:**
89+
- **Cluster**: Must be provided via constructor
90+
- **Bucket**: Must be provided via constructor
91+
- **Scope settings**: Uses explicit configuration via properties
12692

127-
</Tabs>
93+
This architecture ensures explicit audit store configuration with no fallback dependencies.
12894

12995

13096
## Configuration options

docs/audit-stores/community/dynamodb-audit-store.md

Lines changed: 53 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -8,126 +8,87 @@ import TabItem from '@theme/TabItem';
88

99
# DynamoDB Audit Store
1010

11-
This page explains how to configure **Amazon DynamoDB** as Flamingock's audit store.
12-
The audit store is where Flamingock records execution history and ensures safe coordination across distributed deployments.
11+
The DynamoDB audit store (`DynamoSyncAuditStore`) enables Flamingock to record execution history and ensure safe coordination across distributed deployments using Amazon DynamoDB as the storage backend.
1312

1413
> For a conceptual explanation of the audit store vs target systems, see [Audit store vs target system](../../overview/audit-store-vs-target-system.md).
1514
15+
## Version Compatibility
1616

17-
## Minimum setup
17+
| Component | Version Requirement |
18+
|-----------|-------------------|
19+
| AWS SDK DynamoDB Enhanced | 2.12.0+ |
1820

19-
To use DynamoDB as your audit store you need to provide:
20-
- A **DynamoDbClient**
21+
AWS SDK DynamoDB Enhanced 2.12.0+ is required and must be included in your project dependencies.
2122

22-
That's all. Flamingock will take care of tables, indexes, and capacity defaults.
23+
## Installation
2324

24-
Example:
25+
Add the AWS SDK DynamoDB Enhanced dependency to your project:
2526

26-
```java
27-
public class App {
28-
public static void main(String[] args) {
29-
DynamoDbClient client = DynamoDbClient.builder()
30-
.region(Region.US_EAST_1)
31-
.build();
32-
33-
Flamingock.builder()
34-
.setAuditStore(new DynamoSyncAuditStore()
35-
.withClient(client))
36-
.build()
37-
.run();
38-
}
39-
}
27+
<Tabs groupId="gradle_maven">
28+
<TabItem value="gradle" label="Gradle" default>
29+
```kotlin
30+
implementation("software.amazon.awssdk:dynamodb-enhanced:2.28.0")
4031
```
32+
</TabItem>
33+
<TabItem value="maven" label="Maven">
34+
```xml
35+
<dependency>
36+
<groupId>software.amazon.awssdk</groupId>
37+
<artifactId>dynamodb-enhanced</artifactId>
38+
<version>2.28.0</version> <!-- 2.12.0+ supported -->
39+
</dependency>
40+
```
41+
</TabItem>
42+
</Tabs>
4143

42-
## Dependencies
43-
44-
### Required dependencies
45-
46-
| Dependency | Method | Description |
47-
|------------|--------|-------------|
48-
| `DynamoDbClient` | `.withClient(client)` | AWS DynamoDB client - **required** |
49-
50-
## Reusing target system dependencies
44+
## Basic setup
5145

52-
If you're already using a DynamoDB target system, you can reuse its dependencies to avoid duplicating connection configuration:
46+
Configure the audit store:
5347

5448
```java
55-
// Reuse dependencies from existing target system
56-
var dynamoTargetSystem = new DynamoDBTargetSystem("inventory-database")
57-
.withDynamoDBClient(dynamoDbClient);
58-
59-
// Create audit store reusing the same dependencies
60-
var auditStore = DynamoSyncAuditStore
61-
.reusingDependenciesFrom(dynamoTargetSystem);
62-
63-
Flamingock.builder()
64-
.setAuditStore(auditStore)
65-
.addTargetSystems(dynamoTargetSystem)
66-
.build()
67-
.run();
49+
var auditStore = new DynamoSyncAuditStore("audit-store-id", dynamoDbClient);
6850
```
6951

52+
The constructor requires the audit store name and DynamoDB client. Optional configurations can be added via `.withXXX()` methods.
7053

71-
## Supported versions
72-
73-
| AWS SDK | DynamoDB | Support level |
74-
|--------------------------------|----------------|-----------------|
75-
| `dynamodb` 2.25.29+ | All versions | Full support |
54+
:::info Register Audit Store
55+
Once created, you need to register this audit store with Flamingock using `.setAuditStore(auditStore)` in the builder.
56+
:::
7657

58+
## Audit Store Configuration
7759

78-
## Dependencies
60+
The DynamoDB audit store uses explicit configuration with no global context fallback.
7961

80-
<Tabs groupId="build_tool">
62+
### Constructor Dependencies (Mandatory)
8163

82-
<TabItem value="gradle" label="Gradle">
64+
These dependencies must be provided at audit store creation time with **no global context fallback**:
8365

84-
```kotlin
85-
implementation(platform("io.flamingock:flamingock-community-bom:$flamingockVersion"))
86-
implementation("io.flamingock:flamingock-community")
87-
88-
// AWS SDK (if not already present)
89-
implementation("software.amazon.awssdk:dynamodb:2.28.0")
90-
implementation("software.amazon.awssdk:dynamodb-enhanced:2.28.0")
91-
```
66+
| Dependency | Constructor Parameter | Description |
67+
|------------|----------------------|-------------|
68+
| `DynamoDbClient` | `dynamoDbClient` | AWS DynamoDB client - **required** for audit store configuration and data access |
9269

93-
</TabItem>
70+
## Configuration example
9471

95-
<TabItem value="maven" label="Maven">
72+
Here's a comprehensive example showing the configuration:
9673

97-
```xml
98-
<dependencyManagement>
99-
<dependencies>
100-
<dependency>
101-
<groupId>io.flamingock</groupId>
102-
<artifactId>flamingock-community-bom</artifactId>
103-
<version>${flamingock.version}</version>
104-
<type>pom</type>
105-
<scope>import</scope>
106-
</dependency>
107-
</dependencies>
108-
</dependencyManagement>
109-
110-
<dependency>
111-
<groupId>io.flamingock</groupId>
112-
<artifactId>flamingock-community</artifactId>
113-
</dependency>
74+
```java
75+
// Audit store configuration (mandatory via constructor)
76+
var auditStore = new DynamoSyncAuditStore("audit-store-id", dynamoDbClient)
77+
.withProperty("dynamodb.readCapacityUnits", 10) // Optional configuration
78+
.withProperty("dynamodb.writeCapacityUnits", 10); // Optional configuration
11479

115-
<!-- AWS SDK (if not already present) -->
116-
<dependency>
117-
<groupId>software.amazon.awssdk</groupId>
118-
<artifactId>dynamodb</artifactId>
119-
<version>2.28.0</version>
120-
</dependency>
121-
<dependency>
122-
<groupId>software.amazon.awssdk</groupId>
123-
<artifactId>dynamodb-enhanced</artifactId>
124-
<version>2.28.0</version>
125-
</dependency>
80+
// Register with Flamingock
81+
Flamingock.builder()
82+
.setAuditStore(auditStore)
83+
.addTargetSystems(targetSystems...)
84+
.build();
12685
```
12786

128-
</TabItem>
87+
**Audit store configuration resolution:**
88+
- **DynamoDbClient**: Must be provided via constructor
89+
- **Capacity settings**: Uses explicit configuration via properties
12990

130-
</Tabs>
91+
This architecture ensures explicit audit store configuration with no fallback dependencies.
13192

13293

13394
## Configuration options

0 commit comments

Comments
 (0)