Skip to content

Commit

Permalink
Merge pull request #151 from RADAR-base/release-0.5.4
Browse files Browse the repository at this point in the history
Merge dev into master and prepare for release 0.5.4
  • Loading branch information
pvannierop authored Oct 18, 2024
2 parents 6e29fd5 + 7689465 commit 39ca6dc
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 3 deletions.
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,45 @@ docker-compose exec schema-registry-1 kafka-avro-console-consumer \
--topic connect_fitbit_intraday_heart_rate
```

## Flows

The following diagrams shows the flow of the Fitbit source connector. The fitbit source connector is a Kafka Connect source connector that polls the Fitbit API for data. The data is then converted to Avro records and sent to Kafka topics.

### Initialization

On startup, the fitbit connector simply starts up and schedules its regular polling tasks.

```mermaid
sequenceDiagram
participant connector as Fitbit Source Connector
participant kafka as Kafka
connector ->> kafka: Check Kafka readiness (optional)
connector ->> connector: Schedule polling tasks
```

### Regular operation

The Fitbit connector operates by regularly polling the user repository, and regularly polling all configured users for data

```mermaid
sequenceDiagram
participant connector as Fitbit Source Connector
participant userRepo as User Repository (rest-source-auth)
participant fitbit as Fitbit API
participant kafka as Kafka
note over connector: Get users (every 5 minutes)
connector ->> userRepo: Get users @ /users?source-type=FitBit
note over connector: For each user (every 5 seconds)
connector ->> connector: What data should be fetched?
connector ->> userRepo: Get fitbit access token @ users/<id>/token
connector ->> fitbit: Get required data @ api.fitbit.com/1/user/<id>/<data-type>/date/<daterange>
connector ->> kafka: Send data
kafka ->> connector: 200 OK
connector ->> connector: Update offset times
```

## Contributing

Code should be formatted using the [Google Java Code Style Guide](https://google.github.io/styleguide/javaguide.html).
Expand Down
6 changes: 3 additions & 3 deletions buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@Suppress("ConstPropertyName", "MemberVisibilityCanBePrivate")
object Versions {
const val project = "0.5.3"
const val project = "0.5.4"

const val java = 17
const val kotlin = "1.9.22"
Expand All @@ -21,8 +21,8 @@ object Versions {

const val okhttp = "4.12.0"

const val firebaseAdmin = "9.2.0"
const val radarSchemas = "0.8.7-hotfix"
const val firebaseAdmin = "9.4.0"
const val radarSchemas = "0.8.11"
const val ktor = "2.3.10"

const val junit = "5.10.2"
Expand Down

0 comments on commit 39ca6dc

Please sign in to comment.