You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "namelessssssssssss (via GitHub)" <gi...@apache.org> on 2024/01/12 09:18:43 UTC

[PR] New MetadataService with native stub [dubbo]

namelessssssssssss opened a new pull request, #13644:
URL: https://github.com/apache/dubbo/pull/13644

   Migrate MetadataService to native stub to support https://github.com/apache/dubbo/issues/13584
   
   * now MetadataService always use Triple protocol with native stub.


-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] New MetadataService with native stub [dubbo]

Posted by "FoghostCn (via GitHub)" <gi...@apache.org>.
FoghostCn commented on code in PR #13644:
URL: https://github.com/apache/dubbo/pull/13644#discussion_r1451114648


##########
dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/MetadataService.java:
##########


Review Comment:
   why delete `MetadataService.class`



-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] New MetadataService with native stub [dubbo]

Posted by "namelessssssssssss (via GitHub)" <gi...@apache.org>.
namelessssssssssss closed pull request #13644: New MetadataService with native stub
URL: https://github.com/apache/dubbo/pull/13644


-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] New MetadataService with native stub [dubbo]

Posted by "FoghostCn (via GitHub)" <gi...@apache.org>.
FoghostCn commented on code in PR #13644:
URL: https://github.com/apache/dubbo/pull/13644#discussion_r1451184332


##########
dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/metadata/ConfigurableMetadataServiceExporter.java:
##########
@@ -65,13 +66,12 @@ public synchronized ConfigurableMetadataServiceExporter export() {
                     .getInternalServiceExecutor();
             this.serviceConfig = InternalServiceConfigBuilder.<MetadataService>newBuilder(applicationModel)
                     .interfaceClass(MetadataService.class)
-                    .protocol(getApplicationConfig().getMetadataServiceProtocol(), METADATA_SERVICE_PROTOCOL_KEY)
+                    .protocol(TRIPLE, METADATA_SERVICE_PROTOCOL_KEY)

Review Comment:
   If we always use tri protocol, how can we compatiable with old version client



-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] New MetadataService with native stub [dubbo]

Posted by "FoghostCn (via GitHub)" <gi...@apache.org>.
FoghostCn commented on code in PR #13644:
URL: https://github.com/apache/dubbo/pull/13644#discussion_r1451184332


##########
dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/metadata/ConfigurableMetadataServiceExporter.java:
##########
@@ -65,13 +66,12 @@ public synchronized ConfigurableMetadataServiceExporter export() {
                     .getInternalServiceExecutor();
             this.serviceConfig = InternalServiceConfigBuilder.<MetadataService>newBuilder(applicationModel)
                     .interfaceClass(MetadataService.class)
-                    .protocol(getApplicationConfig().getMetadataServiceProtocol(), METADATA_SERVICE_PROTOCOL_KEY)
+                    .protocol(TRIPLE, METADATA_SERVICE_PROTOCOL_KEY)

Review Comment:
   If we always use tri protocol, how can we compatible with old version client



-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] New MetadataService with native stub [dubbo]

Posted by "FoghostCn (via GitHub)" <gi...@apache.org>.
FoghostCn commented on code in PR #13644:
URL: https://github.com/apache/dubbo/pull/13644#discussion_r1451114648


##########
dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/MetadataService.java:
##########


Review Comment:
   why delete `MetadataService.class`, use generated MetadataService insead?



-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] New MetadataService with native stub [dubbo]

Posted by "FoghostCn (via GitHub)" <gi...@apache.org>.
FoghostCn commented on code in PR #13644:
URL: https://github.com/apache/dubbo/pull/13644#discussion_r1451184332


##########
dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/metadata/ConfigurableMetadataServiceExporter.java:
##########
@@ -65,13 +66,12 @@ public synchronized ConfigurableMetadataServiceExporter export() {
                     .getInternalServiceExecutor();
             this.serviceConfig = InternalServiceConfigBuilder.<MetadataService>newBuilder(applicationModel)
                     .interfaceClass(MetadataService.class)
-                    .protocol(getApplicationConfig().getMetadataServiceProtocol(), METADATA_SERVICE_PROTOCOL_KEY)
+                    .protocol(TRIPLE, METADATA_SERVICE_PROTOCOL_KEY)

Review Comment:
   If we always use tri protocol, how can we compatible with old version



-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] New MetadataService with native stub [dubbo]

Posted by "namelessssssssssss (via GitHub)" <gi...@apache.org>.
namelessssssssssss commented on code in PR #13644:
URL: https://github.com/apache/dubbo/pull/13644#discussion_r1451261445


##########
dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/metadata/ConfigurableMetadataServiceExporter.java:
##########
@@ -65,13 +66,12 @@ public synchronized ConfigurableMetadataServiceExporter export() {
                     .getInternalServiceExecutor();
             this.serviceConfig = InternalServiceConfigBuilder.<MetadataService>newBuilder(applicationModel)
                     .interfaceClass(MetadataService.class)
-                    .protocol(getApplicationConfig().getMetadataServiceProtocol(), METADATA_SERVICE_PROTOCOL_KEY)
+                    .protocol(TRIPLE, METADATA_SERVICE_PROTOCOL_KEY)

Review Comment:
   Yes. I will do some refactor later to make sure it can compatible with older version.



-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] New MetadataService with native stub [dubbo]

Posted by "chickenlj (via GitHub)" <gi...@apache.org>.
chickenlj commented on code in PR #13644:
URL: https://github.com/apache/dubbo/pull/13644#discussion_r1452045164


##########
dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/MetadataService.java:
##########


Review Comment:
   I think so.  The service definition is as shown below:
   
   ```protobuf
   package org.apache.dubbo.metadata;
   
   option go_package = "dubbo.apache.org/dubbo-go/v3/metadata/triple_api";
   option java_package = "org.apache.dubbo.metadata";
   option java_multiple_files = true;
   ```



##########
dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/metadata/ConfigurableMetadataServiceExporter.java:
##########
@@ -65,13 +66,12 @@ public synchronized ConfigurableMetadataServiceExporter export() {
                     .getInternalServiceExecutor();
             this.serviceConfig = InternalServiceConfigBuilder.<MetadataService>newBuilder(applicationModel)
                     .interfaceClass(MetadataService.class)
-                    .protocol(getApplicationConfig().getMetadataServiceProtocol(), METADATA_SERVICE_PROTOCOL_KEY)
+                    .protocol(TRIPLE, METADATA_SERVICE_PROTOCOL_KEY)

Review Comment:
   > Yes. I will do some refactor later to make sure it can compatible with older version.
   
   I think it's desired to only support triple protocol in the new release. But we need to guarantee compatibility.



-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] New MetadataService with native stub [dubbo]

Posted by "chickenlj (via GitHub)" <gi...@apache.org>.
chickenlj commented on code in PR #13644:
URL: https://github.com/apache/dubbo/pull/13644#discussion_r1451062418


##########
dubbo-metadata/dubbo-metadata-api/pom.xml:
##########
@@ -84,6 +84,52 @@
       <scope>compile</scope>
     </dependency>
 
+    <dependency>
+      <groupId>org.apache.dubbo</groupId>
+      <artifactId>dubbo-rpc-triple</artifactId>
+      <version>${project.parent.version}</version>
+    </dependency>
   </dependencies>
 
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>kr.motd.maven</groupId>
+        <artifactId>os-maven-plugin</artifactId>
+        <version>${maven_os_plugin_version}</version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>detect</goal>
+            </goals>
+            <phase>initialize</phase>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.xolstice.maven.plugins</groupId>
+        <artifactId>protobuf-maven-plugin</artifactId>
+        <version>${maven_protobuf_plugin_version}</version>
+        <configuration>
+          <protocArtifact>com.google.protobuf:protoc:${protobuf-java_version}:exe:${os.detected.classifier}</protocArtifact>
+          <protocPlugins>
+            <protocPlugin>
+              <id>dubbo</id>
+              <groupId>org.apache.dubbo</groupId>
+              <artifactId>dubbo-compiler</artifactId>
+              <version>${project.parent.version}</version>
+              <mainClass>org.apache.dubbo.gen.tri.Dubbo3TripleGenerator</mainClass>
+            </protocPlugin>
+          </protocPlugins>
+        </configuration>
+        <executions>
+          <execution>
+            <goals>
+              <goal>compile</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>

Review Comment:
   I think we should either put the generated source codes in the source directory or only rely on this plugin and generate code when packaging.



-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] New MetadataService with native stub [dubbo]

Posted by "FoghostCn (via GitHub)" <gi...@apache.org>.
FoghostCn commented on code in PR #13644:
URL: https://github.com/apache/dubbo/pull/13644#discussion_r1451112156


##########
dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/metadata/ConfigurableMetadataServiceExporter.java:
##########
@@ -65,13 +66,12 @@ public synchronized ConfigurableMetadataServiceExporter export() {
                     .getInternalServiceExecutor();
             this.serviceConfig = InternalServiceConfigBuilder.<MetadataService>newBuilder(applicationModel)
                     .interfaceClass(MetadataService.class)
-                    .protocol(getApplicationConfig().getMetadataServiceProtocol(), METADATA_SERVICE_PROTOCOL_KEY)
+                    .protocol(TRIPLE, METADATA_SERVICE_PROTOCOL_KEY)

Review Comment:
   so `application.metadataServiceProtocol ` will not work 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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] New MetadataService with native stub [dubbo]

Posted by "FoghostCn (via GitHub)" <gi...@apache.org>.
FoghostCn commented on code in PR #13644:
URL: https://github.com/apache/dubbo/pull/13644#discussion_r1451114648


##########
dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/MetadataService.java:
##########


Review Comment:
   why delete `MetadataService.class`, the generated MetadataService can completely replace it? 



-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org