Verify docs matches the latest SR changes

- add missing diagrams, fix figure links.
 - add section to run the registry as standalone service.
 - minor doc corrections.

 Resolves #16
This commit is contained in:
Christian Tzolov
2019-11-11 19:37:28 +01:00
parent 020f892d57
commit 2d97ef26a6
4 changed files with 30 additions and 17 deletions

View File

@@ -13,7 +13,7 @@
<name>Spring Cloud Schema Registry Docs</name>
<description>Spring Cloud Schema Registry Docs</description>
<properties>
<docs.main>spring-cloud-function</docs.main>
<docs.main>spring-cloud-schema-registry</docs.main>
<main.basedir>${basedir}/..</main.basedir>
<maven.plugin.plugin.version>3.4</maven.plugin.plugin.version>
</properties>

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@@ -1,8 +1,11 @@
Spring Cloud Schema Registry overview
Spring Cloud Schema Registry provides support for schema evolution so that the data can be evolved over time and still work with older or newer producers and consumers and vice versa. Most serialization models, especially the ones that aim for portability across different platforms and languages, rely on a schema that describes how the data is serialized in the binary payload. In order to serialize the data and then to interpret it, both the sending and receiving sides must have access to a schema that describes the binary format. In certain cases, the schema can be inferred from the payload type on serialization or from the target type on deserialization.
However, many applications benefit from having access to an explicit schema that describes the binary data format.
A schema registry lets you store schema information in a textual format (typically JSON) and makes that information accessible to various applications that need it to receive and send data in binary format.
A schema is referenceable as a tuple consisting of:
* A subject that is the logical name of the schema
@@ -11,11 +14,11 @@ A schema is referenceable as a tuple consisting of:
* The schema format, which describes the binary format of the data
Spring Cloud Schema Registry provides the following compoents
Spring Cloud Schema Registry provides the following components
* Standalone Schema Registry Server
By default, it is using an H2 database, but server can be used with other databases by providing appropriate datasource configuration.
By default, it is using an `H2` database, but server can be used with other databases such as `Postgres` or `MySQL` by providing appropriate datasource configuration.
* Schema registry clients capable of message marshalling by communicating with a Schema Registry.

View File

@@ -5,8 +5,7 @@ Unascribed
*{spring-cloud-schema-registry-version}*
---
:github: https://github.com/spring-cloud/spring-cloud-schema-registry
:github: https://raw.githubusercontent.com/spring-cloud/spring-cloud-schema-registry/master
:githubmaster: {github}/tree/master
:docslink: {githubmaster}/docs/src/main/asciidoc
:nofooter:
@@ -32,7 +31,7 @@ A schema is referenceable as a tuple consisting of:
* The schema format, which describes the binary format of the data
Spring Cloud Schema Registry provides the following compoents
Spring Cloud Schema Registry provides the following components
* Standalone Schema Registry Server
@@ -69,7 +68,7 @@ A client for the Spring Cloud Stream schema registry can be configured by using
@SpringBootApplication
@EnableSchemaRegistryClient
public static class AvroSinkApplication {
...
//...
}
----
@@ -165,7 +164,7 @@ In this example, note that the mime type value is `avro/bytes`, not the default
@SpringBootApplication
public static class SinkApplication {
...
//...
@Bean
public MessageConverter userMessageConverter() {
@@ -182,7 +181,7 @@ Conversely, the following application registers a converter with a predefined sc
@SpringBootApplication
public static class SinkApplication {
...
//...
@Bean
public MessageConverter userMessageConverter() {
@@ -196,17 +195,19 @@ public static class SinkApplication {
=== Schema Registry Server
Spring Cloud Stream provides a schema registry server implementation.
To use it, you can add the `spring-cloud-schema-server` artifact to your project and use the `@EnableSchemaRegistryServer` annotation, which adds the schema registry server REST controller to your application.
This annotation is intended to be used with Spring Boot web applications, and the listening port of the server is controlled by the `server.port` property.
The `spring.cloud.schema.server.path` property can be used to control the root path of the schema server (especially when it is embedded in other applications).
The `spring.cloud.schema.server.allowSchemaDeletion` boolean property enables the deletion of a schema. By default, this is disabled.
To use it, you can download latest `spring-cloud-schema-registry-server` release and run it as standalone application:
The schema registry server uses a relational database to store the schemas.
By default, it uses an embedded database.
You can customize the schema storage by using the http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#boot-features-sql[Spring Boot SQL database and JDBC configuration options].
[source,bash]
----
wget https://repo.spring.io/libs-milestone/org/springframework/cloud/spring-cloud-schema-registry-server/1.0.0.RC2/spring-cloud-schema-registry-server-1.0.0.RC2.jar
java -jar ./spring-cloud-schema-registry-server-1.0.0.RC2.jar
----
[TIP]
====
You can embed the schema registry in your existing Spring Boot web application.
To do this, add the `spring-cloud-schema-server` artifact to your project and use the `@EnableSchemaRegistryServer` annotation, which adds the schema registry server REST controller to your application.
The following example shows a Spring Boot application that enables the schema registry:
[source,java]
----
@SpringBootApplication
@@ -217,6 +218,15 @@ public class SchemaRegistryServerApplication {
}
}
----
====
The `spring.cloud.schema.server.path` property can be used to control the root path of the schema server (especially when it is embedded in other applications).
The `spring.cloud.schema.server.allowSchemaDeletion` boolean property enables the deletion of a schema. By default, this is disabled.
The schema registry server uses a relational database to store the schemas.
By default, it uses an embedded database.
You can customize the schema storage by using the http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#boot-features-sql[Spring Boot SQL database and JDBC configuration options].
==== Schema Registry Server API