Skip to content

Commit f5a2a79

Browse files
committed
Documentation: Minor improvements across the board
1 parent 4ffaf15 commit f5a2a79

File tree

6 files changed

+52
-40
lines changed

6 files changed

+52
-40
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
orphan: true
2+
---
3+
14
# commons-codec
25

36
[![Tests](https://github.com/crate/commons-codec/actions/workflows/tests.yml/badge.svg)](https://github.com/crate/commons-codec/actions/workflows/tests.yml)

doc/cdc/index.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,22 @@
33
`commons-codec` includes CDC -> SQL transformer components for AWS DMS,
44
DynamoDB, and MongoDB.
55

6-
## DynamoDB
7-
- Blog: [Replicating CDC Events from DynamoDB to CrateDB]
8-
- Documentation: [DynamoDB CDC Relay for CrateDB]
6+
:DynamoDB:
7+
- Blog: [Replicating CDC Events from DynamoDB to CrateDB]
8+
- Documentation: [DynamoDB CDC Relay for CrateDB]
99

10-
## MongoDB
11-
- Introduction: [](project:#mongodb-cdc)
12-
- Documentation: [MongoDB CDC Relay for CrateDB]
10+
:MongoDB:
11+
- Usage guide: [](project:#mongodb-cdc)
12+
- Documentation: [MongoDB CDC Relay for CrateDB]
1313

1414

1515
```{toctree}
1616
:hidden:
1717
18-
mongodb
18+
MongoDB <mongodb>
1919
```
2020

2121

22-
:::{note}
23-
Please note relevant components are still in their infancy (beta),
24-
and need further curation and improvements.
25-
:::
26-
2722

2823
## Prior Art
2924

doc/cdc/mongodb.md

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,53 @@
11
(mongodb-cdc)=
22
# Relay MongoDB Change Stream into CrateDB
33

4-
## About
5-
[mongodb_cdc_cratedb.py] demonstrates a basic example program to relay event
6-
records from [MongoDB Change Streams] into [CrateDB].
4+
:::{rubric} What's inside
5+
:::
6+
7+
Documentation and [example program][mongodb_cdc_cratedb.py] how to relay data
8+
from MongoDB into [CrateDB], using [MongoDB Change Streams].
79

810
> Change streams allow applications to access real-time data changes without the prior
911
> complexity and risk of manually tailing the oplog. Applications can use change streams
1012
> to subscribe to all data changes on a single collection, a database, or an entire
1113
> deployment, and immediately react to them.
1214
>
13-
> - https://www.mongodb.com/docs/manual/changeStreams/
14-
> - https://www.mongodb.com/developer/languages/python/python-change-streams/
15+
> - [MongoDB Change Streams]
16+
> - [Monitor Data with Change Streams]
17+
18+
:::{note}
19+
`commons-codec` includes `MongoDBFullLoadTranslator` and `MongoDBCDCTranslator`.
20+
This document and example program is exclusively about the latter.
21+
:::
1522

23+
## Prerequisites
1624

17-
## Services
25+
Start services CrateDB and MongoDB.
1826

19-
### CrateDB
20-
Start CrateDB.
27+
:::{rubric} Start CrateDB
28+
:::
2129
```shell
22-
docker run --rm -it --name=cratedb --publish=4200:4200 --env=CRATE_HEAP_SIZE=2g \
23-
crate:5.7 -Cdiscovery.type=single-node
30+
docker run --rm --name=cratedb --publish=4200:4200 --env=CRATE_HEAP_SIZE=2g \
31+
docker.io/crate:latest '-Cdiscovery.type=single-node'
2432
```
2533

26-
### MongoDB
27-
Start MongoDB.
34+
:::{rubric} Start MongoDB
35+
:::
2836
Please note that change streams are only available for replica sets and
2937
sharded clusters, so let's define a replica set by using the
3038
`--replSet rs-testdrive` option when starting the MongoDB server.
3139
```shell
32-
docker run -it --rm --name=mongodb --publish=27017:27017 \
33-
mongo:7 mongod --replSet rs-testdrive
40+
docker run --rm --name=mongodb --publish=27017:27017 \
41+
docker.io/mongo:8 mongod --replSet rs-testdrive
3442
```
3543

3644
Now, initialize the replica set, by using the `mongosh` command to invoke
3745
the `rs.initiate()` operation.
3846
```shell
3947
export MONGODB_URL="mongodb://localhost/"
40-
docker run -i --rm --network=host mongo:7 mongosh ${MONGODB_URL} <<EOF
48+
docker run -i --rm --network=host docker.io/mongo:8 mongosh ${MONGODB_URL} <<EOF
4149
50+
disableTelemetry()
4251
config = {
4352
_id: "rs-testdrive",
4453
members: [{ _id : 0, host : "localhost:27017"}]
@@ -100,3 +109,4 @@ time, but, again, it has not been correctly initialized.
100109
[CrateDB]: https://github.com/crate/crate
101110
[mongodb_cdc_cratedb.py]: https://github.com/daq-tools/commons-codec/raw/main/examples/mongodb_cdc_cratedb.py
102111
[MongoDB Change Streams]: https://www.mongodb.com/docs/manual/changeStreams/
112+
[Monitor Data with Change Streams]: https://www.mongodb.com/developer/languages/python/python-change-streams/

doc/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
| [LorryStream]
2424

2525
```{include} readme.md
26-
:start-line: 11
26+
:start-line: 15
2727
```
2828

2929

@@ -33,7 +33,7 @@
3333
:hidden:
3434
3535
cdc/index
36-
decode
36+
telemetry
3737
transform
3838
```
3939

doc/decode.md renamed to doc/telemetry.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
1-
# Decoder Collection
1+
# Telemetry decoders
22

33
`commons-codec` includes telemetry data decoders for individual popular sensor
44
appliances.
55

6-
## Sensor.Community
7-
8-
- Air quality measurement appliances of [Sensor.Community].
6+
:Sensor.Community:
97

8+
Air quality measurement appliances of [Sensor.Community].
9+
<br>
1010
Example: [Kotori Sensor.Community integration]
1111

12-
- [Tasmota open source firmware for ESP devices].
12+
:Tasmota:
1313

14+
[Tasmota open source firmware for ESP devices].
15+
<br>
1416
Example: [Kotori Tasmota integration]
1517

16-
- Devices connected to [The Things Stack (TTS)] / [The Things Network (TTN)].
18+
:TTN:
1719

20+
Devices connected to [The Things Stack (TTS)] / [The Things Network (TTN)].
21+
<br>
1822
Example: [Kotori TTN/TTS integration]
1923

2024

doc/transform.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Transform
1+
# Transformations
22

3-
Data transformations are now delegated to [tikray], an external library that
4-
implements the same rule-based pipeline formerly shipped as **zyp**.
5-
See the Tikray documentation for usage examples and migration tips.
3+
Data transformations are delegated to Tikray, an external library that
4+
implements a miniature yet elegant rule-based pipeline system.
5+
See the [Tikray documentation] for usage examples and migration tips.
66

77

8-
[tikray]: https://tikray.readthedocs.io/
8+
[Tikray documentation]: https://tikray.readthedocs.io/

0 commit comments

Comments
 (0)