sijie commented on a change in pull request #4759: [Doc] Add Schema Chapter and Get Started Section URL: https://github.com/apache/pulsar/pull/4759#discussion_r304996684
########## File path: site2/docs/schema-get-started.md ########## @@ -0,0 +1,55 @@ +--- +id: schema-get-started +title: Get started +sidebar_label: Get started +--- + +Pulsar does not parse data, and it takes bytes as inputs and sends bytes as outputs. While data has meaning beyond bytes, you need to parse data and might encounter parse exceptions which mainly occur in the following situations: + +* The field does not exist + +* The field type has changed (for example, `string` is changed to `int`) + +There are a few methods to prevent and overcome these exceptions, for example, you can catch exceptions when parsing errors, which makes code hard to maintain; or you can adopt a schema management system to perform schema evolution, not to break downstream applications, and enforces type safety to max extend in the language you are using, the solution is Pulsar Schema. + +Pulsar schema enables you to use language-specific types of data when constructing and handling messages from simple types like `string` to more complex application-specific types. + +**Example** + +You can use the _User_ class to define the messages sent to Pulsar topics. Review comment: The paragraphs above is used for introducing Pulsar schema. The following paragraphs is using an example to example the differences between with schema and without schema. so I think you might consider adding one paragraph here to explain you are using an example to show the difference, and add another paragraph at the end of the chapter to summarize. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
