Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
hariso committed May 3, 2024
1 parent f251376 commit faf347c
Showing 1 changed file with 30 additions and 18 deletions.
48 changes: 30 additions & 18 deletions docs/design-documents/20240430-schema-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,19 @@
<!-- TOC -->
* [The problem](#the-problem)

Check failure on line 4 in docs/design-documents/20240430-schema-support.md

View workflow job for this annotation

GitHub Actions / markdownlint-cli2

Unordered list style

docs/design-documents/20240430-schema-support.md:4:1 MD004/ul-style Unordered list style [Expected: dash; Actual: asterisk] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md004.md

Check failure on line 4 in docs/design-documents/20240430-schema-support.md

View workflow job for this annotation

GitHub Actions / markdownlint-cli2

Unordered list indentation

docs/design-documents/20240430-schema-support.md:4:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md007.md
* [Requirements](#requirements)

Check failure on line 5 in docs/design-documents/20240430-schema-support.md

View workflow job for this annotation

GitHub Actions / markdownlint-cli2

Unordered list style

docs/design-documents/20240430-schema-support.md:5:1 MD004/ul-style Unordered list style [Expected: dash; Actual: asterisk] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md004.md

Check failure on line 5 in docs/design-documents/20240430-schema-support.md

View workflow job for this annotation

GitHub Actions / markdownlint-cli2

Unordered list indentation

docs/design-documents/20240430-schema-support.md:5:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md007.md
* [Non-goals](#non-goals)

Check failure on line 6 in docs/design-documents/20240430-schema-support.md

View workflow job for this annotation

GitHub Actions / markdownlint-cli2

Unordered list style

docs/design-documents/20240430-schema-support.md:6:1 MD004/ul-style Unordered list style [Expected: dash; Actual: asterisk] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md004.md

Check failure on line 6 in docs/design-documents/20240430-schema-support.md

View workflow job for this annotation

GitHub Actions / markdownlint-cli2

Unordered list indentation

docs/design-documents/20240430-schema-support.md:6:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md007.md
* [Schema format](#schema-format)

Check failure on line 7 in docs/design-documents/20240430-schema-support.md

View workflow job for this annotation

GitHub Actions / markdownlint-cli2

Unordered list style

docs/design-documents/20240430-schema-support.md:7:1 MD004/ul-style Unordered list style [Expected: dash; Actual: asterisk] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md004.md

Check failure on line 7 in docs/design-documents/20240430-schema-support.md

View workflow job for this annotation

GitHub Actions / markdownlint-cli2

Unordered list indentation

docs/design-documents/20240430-schema-support.md:7:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md007.md
* [Support for schemas originating from other streaming tools](#support-for-schemas-originating-from-other-streaming-tools)

Check failure on line 8 in docs/design-documents/20240430-schema-support.md

View workflow job for this annotation

GitHub Actions / markdownlint-cli2

Unordered list style

docs/design-documents/20240430-schema-support.md:8:1 MD004/ul-style Unordered list style [Expected: dash; Actual: asterisk] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md004.md
* [Schema evolution](#schema-evolution)
* [Schema is left as part of the record](#schema-is-left-as-part-of-the-record)
* [Schema is copied into the schema registry](#schema-is-copied-into-the-schema-registry)
* [Schema evolution and versioning](#schema-evolution-and-versioning)
* [Implementation](#implementation)
* [Schema operations](#schema-operations)
* [Option 1: Stream of commands and responses](#option-1-stream-of-commands-and-responses)
* [Option 2: Exposing Conduit as a service](#option-2-exposing-conduit-as-a-service)
* [Chosen option](#chosen-option)
* [Schema storage](#schema-storage)
* [Schema service](#schema-service)
* [Schema service interface](#schema-service-interface)
* [Option 1: Stream of commands and responses](#option-1-stream-of-commands-and-responses)
* [Option 2: Exposing Conduit as a service](#option-2-exposing-conduit-as-a-service)
* [Chosen option](#chosen-option)
* [Questions](#questions)
* [Other considerations](#other-considerations)
<!-- TOC -->
Expand Down Expand Up @@ -100,9 +105,13 @@ connectors with Conduit. Here we have two possibilities:
1. The schema is part of the record (e.g. Debezium records)
2. The schema can be found in a schema registry (e.g. an Avro schema registry)

TBD
Following options are possible here:

## Schema evolution
#### Schema is left as part of the record

#### Schema is copied into the schema registry

## Schema evolution and versioning

TBD (this section is about checking if a new version of a schema is compatible
with the previous one)
Expand Down Expand Up @@ -168,20 +177,23 @@ message Field {
}
```

The Connector SDK will provide Go types and functions to work with schemas, i.e.
a connector developer won't work with Protobuf directly.

### Schema storage

The schemas are stored in Conduit's database. Currently, there's no need to use
an external service.
The schemas are stored in Conduit's database. Based on the current requirements,
there's no need to use an external service.

### Schema service

The following section discusses the implementation of a schema service in Conduit.

### Schema operations
#### Schema service interface

Source connectors need a way to register a schema, and destination connectors
need a way to fetch a schema. Regardless of which schema registry is used (an
internal one in Conduit or an external service), the access should be abstracted
away and should go through Conduit. With that, we have the following
implementation options:
This section discusses the schema service's interface.

#### Option 1: Stream of commands and responses
##### Option 1: Stream of commands and responses

This pattern is used in WASM processors. A server (in this case: Conduit)
listens to commands (in this case: via a bidirectional gRPC stream). A client (
Expand Down Expand Up @@ -229,7 +241,7 @@ message Response {
the connector) needs to check the response type. In case multiple commands
are sent, we need ordering guarantees.

#### Option 2: Exposing Conduit as a service
##### Option 2: Exposing Conduit as a service

Conduit exposes a service to work with schemas. Connectors access the service
and call methods on the service.
Expand All @@ -250,7 +262,7 @@ send its gRPC port to the connector via the `Configure` method.

1. Changes needed to communicate Conduit's gRPC port to the connector.

#### Chosen option
##### Chosen option

**Option 2** is the chosen method since it offers more clarity and the support for
remote Conduit instances.
Expand Down

0 comments on commit faf347c

Please sign in to comment.