gaoran10 commented on code in PR #24328:
URL: https://github.com/apache/pulsar/pull/24328#discussion_r2153537079


##########
pip/pip-420.md:
##########
@@ -0,0 +1,253 @@
+# PIP-420: Provide ability for Pulsar clients to integrate with third-party 
schema registry service
+
+# Background knowledge
+
+Schema is an important feature for messaging systems. Pulsar integrates schema 
manager into the Pulsar broker.
+The current implementation in Pulsar clients couples schema management with 
some protocols (creating producer, adding consumer subscription).
+This increases the Pulsar protocol complexity and users can’t leverage 
third-party schema registry services in Pulsar client.
+
+# Motivation
+
+The Pulsar client is better has the ability to access third-party schema 
registry service to manage the schema (register schema,
+get schema, validate schema, etc.). The schema registry service can be an 
independent service, if using third-party schema registry service,
+the Pulsar broker doesn't need to care about the schema of the messages.
+
+# Goals
+
+## In Scope
+
+- Provide an ability to leverage third-party schema registry service for 
Pulsar client.
+
+## Out Scope
+
+This PIP will not include the implementation for accessing third-party schema 
system.
+
+# High Level Design
+
+This PIP is just for providing some abilities.
+
+- Decouple schema management from creating producer or add consumer 
subscription commands.
+- Provide a way to build external schema management system clients and 
integrate with Pulsar clients.
+
+# Detailed Design
+
+## Design & Implementation Details
+
+This PIP's target is decoupling schema management from Pulsar messaging 
protocols,
+and making Pulsar client have the ability to leverage external schema registry 
service to manage schema.
+The external schema registry is responsible for managing the schema, the 
broker doesn't care about the messaging schema.
+The Pulsar client should ignore the schema information when creating producer 
and adding consumer subscription.
+
+Users can implement the `SchemaInfoProvider` interface and `Schema` interface 
to access external schema registry service.
+The `Schema` interface has mainly two methods `encode` and `decode`, the 
customized schemas can register schema or get schema with these methods.

Review Comment:
   Good suggestions.
   
   When encoding, the external schema implementations should throw 
`SchemaSerializationException` if they encounter any exceptions, then the 
client can catch the exception and return it to the users. Users should handle 
exceptions when getting the value by themselves. I added to the "Key `Schema` 
Interface Methods" section.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to