jzhou59 commented on pull request #821: URL: https://github.com/apache/incubator-eventmesh/pull/821#issuecomment-1086895286
> You may need to add `gradle.properties`, this will be used when packaging. > > BTY, I think your `SchemaRegistry` design is not great. I suggest the schema just need to considerate how to serialize and deserialize. It doesn't need to take care about how to register schema, this should be implemen at `RegisterCenter` plugin. Sure, currently it is only ```api``` package and I will add ```gradle.properties``` in implementations. The registering-related and retrieving-related procedures are indeed better in ```registry```-related plugin and I will modify it later. However, I am not very clear about what should Eventmesh do with schema. As far as I am concerned, there are four main concepts of schema: contract, serialization, deserialization, and validity. - For contract, a schema is a contracted format of message between producer and consumer. - For serialization, a producer serializes a message according to the contracted schema. - For deserialization, a consumer deserializes a message according to the contracted schema. - For validity, usually, a consumer checks the validity of the inbound serialized message before deserializing it. So I was thinking that Eventmesh could take care of validity. If the inbound message from the producer is not obeying the specified schema, Eventmesh will discard this message and send an error status to the producer. The corresponding modules could be ```eventmesh-schema-json ```, ```eventmesh-schema-avro ```, and ```eventmesh-schema-protobuf ```. Also, I get your point. Thinking from object-oriented programming, schema plugins could also provide the functions of ```serialize``` and ```deserialize```. Correct me if I had a misunderstanding. What do you think? -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
