You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@eventmesh.apache.org by GitBox <gi...@apache.org> on 2021/08/12 19:15:35 UTC

[GitHub] [incubator-eventmesh] JunjieChou opened a new pull request #498: [ISSUE #339] Design the architecture and interfaces

JunjieChou opened a new pull request #498:
URL: https://github.com/apache/incubator-eventmesh/pull/498


   # Schema Integration in EventMesh
   ## ISSUE
   #339
   ## Goals
   - ensure a message could be understood by both producer and consumer
   - validate a message is serialized correctly
   
   ## Comparison of Schema Integration in EventMesh and Other Projects
   Project | Application
   :---: | :---
   EMQ | use "Schema Registry" and "Rule Matching" to transfer a message from one serialization format to another
   Pulsar | use "Schema Registry" to validate a message
   Kafka(Confluent) | satisfy the aforementioned two goals, inside which the second one is optional
   EventMesh | satisfy the aforementioned two goals
   
   ## Archetecture
   <img width="603" alt="EventMeshSchemaRegistryArchitecture_3rd_edition" src="https://user-images.githubusercontent.com/28994988/129255292-e61acc87-5250-4be5-ac9c-a099f6ef157c.png">
   
   ## LifeCycle of Schema in Messages
   The highlevel lifecycle of schema in messages undergoes 9 steps as follows:
   - step1: Producer registers a schema to OpenSchema Registry through OpenSchema service plugin.
   - step2: Producer receives schema id from OpenSchema Registry.
   - step3: Producer patch the schema id in front of messages and send them to EventMesh.
   - step4: In a load-balanced way, EventMesh validate whether the format of messages is correct. Here, the load-balanced way means that the EventMesh, which is the entry port of messages, validates messages one skiping one and the rest messages are validated in the EventMesh which is the outer port.
   - step5: EventMesh patch a status(true/false) for validation in front of schema id and router it to the EventMesh where the outer port exists.
   - step6: EventMesh validates those non-validated messages.
   - step7: EventMesh unpatch validation status and send [schema id + message] to the consumer.
   - step8: Consumer unpatch the schema id and retreive the schema from OpenSchema Registry.
   - step9: Consumer de-serialize messages according to schema.
   ## OpenSchema Restful
   Method | URL | RequestBody | ResponseBody
   :--- | :--- | :--- | :---
   **Subject**|
   POST | /subjects/{string:subject} | {subject:{JSON:subject}} | {subject:{JSON:subject}}
   GET | /subjects | None | {subjects:{JSONArray:subjects}}
   GET | /subjects/{string:subject} | None | {subject:{JSON:subject}}
   GET | /schemas/ids/{string:id}/subjects | None | {subject:{JSON:subject}}
   DELETE | /subjects/{string:subject} | None | [versions:{JSONArray:versions}]
   **Schema**|
   POST | /subjects/{string:subject}/versions | {schema:{JSON:schema}} | {id:{string:id}}
   GET | /schemas/ids/{string:id} | None | {schema:{JSON:schema}} 
   GET | /subjects/{string:subject}/versions/{int:version}/schema | None | {schema:{JSON:schema}}
   GET | /subjects/{string:subject}/versions | None | [versions:{JSONArray:versions}]
   DELETE | /subjects/{string:subject}/versions/{int:version} | None | version:{int:version}
   **Compatibility**|
   POST | /compatibility/subjects/{string:subject}/versions/{int:version} | {schema:{JSON:schema}} | {is_compatible:{boolean:is_compatible}}
   PUT | /config/{string:subject} | {"compatibility":{string:compatibility}} | {"compatibility":{string:compatibility}}
   GET | /config/{string:subject} | None | {"compatibility":{string:compatibility}}
   
   ## Java Interface Definition
   We define three beans(```Subject.java```, ```Schema.java```, and ```Compatibility.java```), and two interfaces(```OpenSchemaService.java``` and ```OpenSchemaValidationService.java```).
   ```java
   public class Subject {
       String tenant;
       String namespace;
       String subject;
       String app;
       String description;
       String status;
       Compatibility compatibility;
       String coordinate;
   }
   
   public class Schema {
       Subject subject;
       String name;
       int id;
       String comment;
       String serialization;
       String schemaType;
       String schemaDefinition;
       String validator;
       int version;
   }
   
   public enum Compatibility {
       BACKWARD,
       BACKWARD_TRANSITIVE,
       FORWARD,
       FORWARD_TRANSITIVE,
       FULL,
       FULL_TRANSITIVE,
       NONE
   }
   
   @EventMeshSPI(isSingleton = false)
   public interface OpenSchemaService {
   
       // Subject
       Subject registerSubject(String subjectName, Subject subject);
   
       List<Subject> retrieveAllSubjects();
   
       Subject retrieveSubjectByName(String subjectName);
   
       Subject retrieveSubjectBySchemaID(int schemaID);
   
       int[] deleteSubjectByName(String subjectName);
   
       // Schema
       int registerSchema(String subjectName, Schema schema);
   
       Schema retrieveSchemaByID(int id);
   
       Schema retrieveSchemaByVersionInSubject(String subjectName, int version);
   
       List<Schema> retrieveAllSchemasBySubject(String subjectName);
   
       int deleteSchemaByVersionInSubject(String subjectName, int version);
   
       // Compatibility
       boolean isSchemaCompatibleWithVersionInSubject(String subjectName, int version, Schema schema);
   
       Compatibility alterCompatibilityBySubject(String subjectName, Compatibility compatibility);
   
       Compatibility retrieveCompatibilityBySubject(String subjectName);
   }
   
   @EventMeshSPI(isSingleton = true)
   public interface OpenSchemaValidationService {
       Schema retrieveSchemaByID(int id);
   
       boolean validateMessageFormatBySchema(String message, Schema schema);
   }
   
   ```
   


-- 
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: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] JunjieChou commented on a change in pull request #498: [ISSUE #339] Design the architecture and interfaces of OpenSchema integration

Posted by GitBox <gi...@apache.org>.
JunjieChou commented on a change in pull request #498:
URL: https://github.com/apache/incubator-eventmesh/pull/498#discussion_r688931224



##########
File path: eventmesh-rest/src/main/java/org/apache/eventmesh/rest/OpenSchema/SchemaService/OpenSchemaService.java
##########
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.eventmesh.rest.OpenSchema.SchemaService;
+
+import org.apache.eventmesh.rest.OpenSchema.Bean.Compatibility;
+import org.apache.eventmesh.rest.OpenSchema.Bean.Schema;
+import org.apache.eventmesh.rest.OpenSchema.Bean.Subject;
+import org.apache.eventmesh.spi.EventMeshSPI;
+
+import java.util.List;
+
+@EventMeshSPI(isSingleton = true)
+public interface OpenSchemaService {
+
+    // Subject

Review comment:
       Hi, thanks for your review, what standard annotation do you think I should use?  I set this annotation the same as annotation of  ```org.apache.eventmesh.api.consumer.MeshMQPushConsumer``` because they are all plugins in runtime.




-- 
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: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] yzhao244 commented on a change in pull request #498: [ISSUE #339] Design the architecture and interfaces of OpenSchema integration

Posted by GitBox <gi...@apache.org>.
yzhao244 commented on a change in pull request #498:
URL: https://github.com/apache/incubator-eventmesh/pull/498#discussion_r690695481



##########
File path: settings.gradle
##########
@@ -25,4 +25,5 @@ include 'eventmesh-test'
 include 'eventmesh-spi'
 include 'eventmesh-connector-plugin:eventmesh-connector-api'
 include 'eventmesh-connector-plugin:eventmesh-connector-rocketmq'
+include 'eventmesh-rest'

Review comment:
       I think @ruanwenjun 's idea of creating eventmesh-openschema-rest under its own plugin is good. Basically, the plugin becomes very self-contained.. Regarding #435, I will update to suggest creating a new module called eventmesh-admin-plugin which contains its own eventmesh-admin-rest along with other dependencies.   




-- 
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: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] yzhao244 commented on a change in pull request #498: [ISSUE #339] Design the architecture and interfaces of OpenSchema integration

Posted by GitBox <gi...@apache.org>.
yzhao244 commented on a change in pull request #498:
URL: https://github.com/apache/incubator-eventmesh/pull/498#discussion_r690695481



##########
File path: settings.gradle
##########
@@ -25,4 +25,5 @@ include 'eventmesh-test'
 include 'eventmesh-spi'
 include 'eventmesh-connector-plugin:eventmesh-connector-api'
 include 'eventmesh-connector-plugin:eventmesh-connector-rocketmq'
+include 'eventmesh-rest'

Review comment:
       I think @ruanwenjun 's idea of creating eventmesh-openschema-rest under its own plugin is good. Basically, the plugin becomes very self-contained.. Regarding #435, I will update to suggest creating a new module called eventmesh-admin-plugin which contains its own eventmesh-admin-rest along with other dependencies.   




-- 
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: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] qqeasonchen commented on pull request #498: [ISSUE #339] Design the architecture and interfaces of OpenSchema integration

Posted by GitBox <gi...@apache.org>.
qqeasonchen commented on pull request #498:
URL: https://github.com/apache/incubator-eventmesh/pull/498#issuecomment-900876878


   @JunjieChou I sugget commiting the design doc seperate with code implementation. for  this pr, you can just commit the doc only.


-- 
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: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] JunjieChou closed pull request #498: [ISSUE #339] Design the architecture and interfaces of OpenSchema integration

Posted by GitBox <gi...@apache.org>.
JunjieChou closed pull request #498:
URL: https://github.com/apache/incubator-eventmesh/pull/498


   


-- 
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: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] JunjieChou commented on a change in pull request #498: [ISSUE #339] Design the architecture and interfaces of OpenSchema integration

Posted by GitBox <gi...@apache.org>.
JunjieChou commented on a change in pull request #498:
URL: https://github.com/apache/incubator-eventmesh/pull/498#discussion_r688930966



##########
File path: eventmesh-rest/build.gradle
##########
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+dependencies {
+    implementation project(':eventmesh-spi')
+    testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0'

Review comment:
       > Maybe you can just use `org.junit.jupiter:junit-jupiter-api` here, the version of dependency is defined in build.gradle of root project
   
   OK




-- 
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: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] ruanwenjun commented on a change in pull request #498: [ISSUE #339] Design the architecture and interfaces of OpenSchema integration

Posted by GitBox <gi...@apache.org>.
ruanwenjun commented on a change in pull request #498:
URL: https://github.com/apache/incubator-eventmesh/pull/498#discussion_r688201713



##########
File path: settings.gradle
##########
@@ -25,4 +25,5 @@ include 'eventmesh-test'
 include 'eventmesh-spi'
 include 'eventmesh-connector-plugin:eventmesh-connector-api'
 include 'eventmesh-connector-plugin:eventmesh-connector-rocketmq'
+include 'eventmesh-rest'

Review comment:
       Maybe it is better to split this module into two modules like `eventmesh-openschema-api` and `eventmesh-openschema-rest` like other spi module if you hope to add another implementations in the future.
   




-- 
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: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] ruanwenjun commented on a change in pull request #498: [ISSUE #339] Design the architecture and interfaces of OpenSchema integration

Posted by GitBox <gi...@apache.org>.
ruanwenjun commented on a change in pull request #498:
URL: https://github.com/apache/incubator-eventmesh/pull/498#discussion_r688942016



##########
File path: eventmesh-rest/src/main/java/org/apache/eventmesh/rest/OpenSchema/SchemaService/OpenSchemaService.java
##########
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.eventmesh.rest.OpenSchema.SchemaService;
+
+import org.apache.eventmesh.rest.OpenSchema.Bean.Compatibility;
+import org.apache.eventmesh.rest.OpenSchema.Bean.Schema;
+import org.apache.eventmesh.rest.OpenSchema.Bean.Subject;
+import org.apache.eventmesh.spi.EventMeshSPI;
+
+import java.util.List;
+
+@EventMeshSPI(isSingleton = true)
+public interface OpenSchemaService {
+
+    // Subject

Review comment:
       Yes, the annotation is right.
   It's my wrong, I just mean you can add the standard comment annotation to write comment in interface, then others can  easily know the method of the interface, and add implementation easily.




-- 
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: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] JunjieChou closed pull request #498: [ISSUE #339] Design the architecture and interfaces of OpenSchema integration

Posted by GitBox <gi...@apache.org>.
JunjieChou closed pull request #498:
URL: https://github.com/apache/incubator-eventmesh/pull/498


   


-- 
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: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] qqeasonchen commented on pull request #498: [ISSUE #339] Design the architecture and interfaces of OpenSchema integration

Posted by GitBox <gi...@apache.org>.
qqeasonchen commented on pull request #498:
URL: https://github.com/apache/incubator-eventmesh/pull/498#issuecomment-900876878


   @JunjieChou I sugget commiting the design doc seperate with code implementation. for  this pr, you can just commit the doc only.


-- 
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: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] jinrongluo commented on pull request #498: [ISSUE #339] Design the architecture and interfaces

Posted by GitBox <gi...@apache.org>.
jinrongluo commented on pull request #498:
URL: https://github.com/apache/incubator-eventmesh/pull/498#issuecomment-898059208


   The event-rest module interface looks good. Thanks.


-- 
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: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] ruanwenjun commented on a change in pull request #498: [ISSUE #339] Design the architecture and interfaces of OpenSchema integration

Posted by GitBox <gi...@apache.org>.
ruanwenjun commented on a change in pull request #498:
URL: https://github.com/apache/incubator-eventmesh/pull/498#discussion_r688941776



##########
File path: settings.gradle
##########
@@ -25,4 +25,5 @@ include 'eventmesh-test'
 include 'eventmesh-spi'
 include 'eventmesh-connector-plugin:eventmesh-connector-api'
 include 'eventmesh-connector-plugin:eventmesh-connector-rocketmq'
+include 'eventmesh-rest'

Review comment:
       I think the first one is good, since the module is main about openschema




-- 
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: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] ruanwenjun commented on a change in pull request #498: [ISSUE #339] Design the architecture and interfaces of OpenSchema integration

Posted by GitBox <gi...@apache.org>.
ruanwenjun commented on a change in pull request #498:
URL: https://github.com/apache/incubator-eventmesh/pull/498#discussion_r688201713



##########
File path: settings.gradle
##########
@@ -25,4 +25,5 @@ include 'eventmesh-test'
 include 'eventmesh-spi'
 include 'eventmesh-connector-plugin:eventmesh-connector-api'
 include 'eventmesh-connector-plugin:eventmesh-connector-rocketmq'
+include 'eventmesh-rest'

Review comment:
       Maybe it is better to rename this module to eventmesh-rest-api like other spi module if you hope to add another implementations in the future.

##########
File path: eventmesh-rest/build.gradle
##########
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+dependencies {
+    implementation project(':eventmesh-spi')
+    testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0'

Review comment:
       Maybe you can just use `org.junit.jupiter:junit-jupiter-api` here, the version of dependency is defined in build.gradle of root project

##########
File path: eventmesh-rest/src/main/java/org/apache/eventmesh/rest/OpenSchema/SchemaService/OpenSchemaService.java
##########
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.eventmesh.rest.OpenSchema.SchemaService;
+
+import org.apache.eventmesh.rest.OpenSchema.Bean.Compatibility;
+import org.apache.eventmesh.rest.OpenSchema.Bean.Schema;
+import org.apache.eventmesh.rest.OpenSchema.Bean.Subject;
+import org.apache.eventmesh.spi.EventMeshSPI;
+
+import java.util.List;
+
+@EventMeshSPI(isSingleton = true)
+public interface OpenSchemaService {
+
+    // Subject

Review comment:
       It is better to use stander java annotation in spi interface.
   https://www.oracle.com/technical-resources/articles/java/javadoc-tool.html.




-- 
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: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] JunjieChou commented on a change in pull request #498: [ISSUE #339] Design the architecture and interfaces of OpenSchema integration

Posted by GitBox <gi...@apache.org>.
JunjieChou commented on a change in pull request #498:
URL: https://github.com/apache/incubator-eventmesh/pull/498#discussion_r688932390



##########
File path: settings.gradle
##########
@@ -25,4 +25,5 @@ include 'eventmesh-test'
 include 'eventmesh-spi'
 include 'eventmesh-connector-plugin:eventmesh-connector-api'
 include 'eventmesh-connector-plugin:eventmesh-connector-rocketmq'
+include 'eventmesh-rest'

Review comment:
       > Maybe it is better to split this module into two modules like `eventmesh-openschema-api` and `eventmesh-openschema-rest` like other spi module if you hope to add another implementations in the future.
   
   That's a good suggestion. Should I create a new ```eventmesh-openschema-plugin``` module under main```EventMesh``` project, and put ```eventmesh-openschema-api``` and ```eventmesh-openschema-rest``` in it. Or create ```eventmesh-openschema-plugin``` module under ```eventmesh-rest```. I prefer the former one, but #435 suggests all RESTful APIs in ```eventmesh-rest```, how 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: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org