Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[refactor][doc] Refactor the information architecture of Schema topics #18242

Merged
merged 11 commits into from
Nov 5, 2022

Conversation

momo-jun
Copy link
Contributor

@momo-jun momo-jun commented Oct 28, 2022

Motivation

Improve the doc set of the Schema chapter to provide Pulsar users with a more accurate, easy-to-read, and comprehensive information experience.

Fixes #18151

Modifications

  1. Curate a new Overview topic to introduce WHAT/WHY/HOW about Schema.
  2. Curate a new Get Started topic to introduce how to construct a schema.
  3. Improve the IA inside the Understand Schema and Schema evolution and compatibility topics. -- Will evaluate whether it makes more sense to merge Schema evolution and compatibility into Understand Schema with more reviews.
  4. Relocate content in Manage Schema into Admin Interfaces - Schemas (new) and Understand Schema" topics.
  5. Move examples and references from Client Libraries - Java/C++ to a single source inside Get started.
  6. Remove duplicate or redundant information.

Note that this PR is a quick change to the overall IA of security topics. The detailed content updates and improvements will be continued and reviewed in a follow-up PR.

image

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

@github-actions github-actions bot added the doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. label Oct 28, 2022
@momo-jun momo-jun marked this pull request as ready for review October 31, 2022 08:27
@momo-jun momo-jun self-assigned this Oct 31, 2022
site2/docs/schema-get-started.md Outdated Show resolved Hide resolved
site2/docs/schema-get-started.md Outdated Show resolved Hide resolved
.create();
```

The following schema formats are currently available for Java:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section seems to be introducing the Avro schema, but why are other schemas also introduced here?

If we want to indicate that all these schemas are based on Avro protocol, then I think it's better to use Avro based schema ... as the title. Otherwise, it will make uses confused because there is an AvroSchema based on Avro protocol.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. I added a new heading to introduce these examples as a quick twist. Most content changes in this PR are a copy&paste to implement a quick information architecture change. A thorough content review will be done in the following week through Google docs:)

client.subscribe("topic-avro", "sub-2", consumerConf, consumer)
```

### ProtobufNative schema using C++
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we also need to talk about ProtobufNative schema using Java?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. Will leave it to the next round of content review/revise because this PR focuses more on the information architecture changes.

site2/docs/schema-understand.md Outdated Show resolved Hide resolved
Pulsar provides the following methods to encode a key/value pair in messages:
You can choose the encoding type when constructing the key/value schema.:
* `INLINE` - Key/value pairs are encoded together in the message payload.
* `SEPARATED` - see [Construct a key/value schema](schema-get-started.md#construct-a-keyvalue-schema).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to briefly explain SEPARATED here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. Will leave it to the next round of content review/revise because this PR focuses more on the information architecture changes.

site2/docs/client-libraries-cpp.md Outdated Show resolved Hide resolved
@momo-jun
Copy link
Contributor Author

momo-jun commented Nov 3, 2022

@RobertIndie Thanks for your review and comments. I addressed some of them and will leave the others to the next follow-up PR. Because this PR focuses more on the information architecture changes, and some changes (except the WHAT/WHY in the Overview) are a copy&paste work among topics. A thorough content review will be done in the following week through Google docs to add/change more details and I will invite you as a reviewer :)

@momo-jun
Copy link
Contributor Author

momo-jun commented Nov 4, 2022

@congbobo184 @RobertIndie I've created a Google doc to start the review/revise process on the content and added Zike's comments there. We can collaborate to review/revise in detail there.

site2/docs/schema-understand.md Outdated Show resolved Hide resolved
site2/docs/schema-understand.md Outdated Show resolved Hide resolved
site2/docs/schema-understand.md Outdated Show resolved Hide resolved
This section describes the details of type and usage of the `struct` schema.

##### Type
#### `struct` schema

`struct` schema supports `AvroBaseStructSchema` and `ProtobufNativeSchema`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AvroSchema JsonSchema etc. is struct schema, later we should add these

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added the comment in the Google doc as part of the content review.

* keeps data compatibility on-track between schema versions. When new schemas are uploaded, the new versions can be read by old consumers.
* stored in the existing storage layer BookKeeper, no additional system required.

## How it works
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whether move to understand schema, the user may not understand how it works here, and may not care about it in the Overview

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. I think it also helps users understand what schema is. This move can be considered and improved in the content review.

Comment on lines +19 to +21
### How schema evolves?

For more information, see [Schema compatibility check strategy](#schema-compatibility-check-strategy).
The answer is [schema compatibility check strategy](#schema-compatibility-check-strategy). It determines how schema compares old schemas with new schemas in topics.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we delete it? doesn't seem to say anything

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed. Can be considered and improved in the content review.

@@ -6,29 +6,21 @@ sidebar_label: "Schema evolution and compatibility"

Normally, schemas do not stay the same over a long period of time. Instead, they undergo evolutions to satisfy new needs.

This chapter examines how Pulsar schema evolves and what Pulsar schema compatibility check strategies are.
This chapter introduces how Pulsar schema evolves and what compatibility check strategies it adopts.

## Schema evolution
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we move this to Understand Schema? It feels awkward to put it here, the user must have enough context to understand it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, will be done in the next move. Leaving it in this PR just to track the changes made to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Your PR contains doc changes, no matter whether the changes are in markdown or code files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Doc] Refactor the information architecture and content of Schema
4 participants