You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@eventmesh.apache.org by "mxsm (via GitHub)" <gi...@apache.org> on 2023/04/16 14:09:13 UTC

[GitHub] [eventmesh] mxsm opened a new pull request, #3746: [ISSUE #3485]Optimize Grpc protocol for Java

mxsm opened a new pull request, #3746:
URL: https://github.com/apache/eventmesh/pull/3746

   <!--
   ### Contribution Checklist
   
     - Name the pull request in the form "[ISSUE #XXXX] Title of the pull request", 
       where *XXXX* should be replaced by the actual issue number.
       Skip *[ISSUE #XXXX]* if there is no associated github issue for this pull request.
   
     - Fill out the template below to describe the changes contributed by the pull request. 
       That will give reviewers the context they need to do the review.
     
     - Each pull request should address only one issue. 
       Please do not mix up code from multiple issues.
     
     - Each commit in the pull request should have a meaningful commit message.
   
     - Once all items of the checklist are addressed, remove the above text and this checklist, 
       leaving only the filled out template below.
   
   (The sections below can be removed for hotfixes of typos)
   -->
   
   <!--
   (If this PR fixes a GitHub issue, please add `Fixes #<XXX>` or `Closes #<XXX>`.)
   -->
   
   Fixes #<XXXX>.
   
   ### Motivation
   
   *Explain the content here.*
   *Explain why you want to make the changes and what problem you're trying to solve.*
   
   
   
   ### Modifications
   
   *Describe the modifications you've done.*
   
   - Added EventMesh's CloudEvents protocol to replace the SimpleMessage protocol.
   
   - The SimpleMessage protocol is temporarily not removed and the code is still present in the project. It will be removed in the future.
   - The protocol has been replaced in the SDK and runtime modules.
   
   ### Documentation
   
   - Does this pull request introduce a new feature? (yes / no)
   - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
   - If a feature is not applicable for documentation, explain why?
   - If a feature is not documented yet in this PR, please create a followup issue for adding the documentation
   


-- 
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] [eventmesh] mxsm commented on pull request #3746: [ISSUE #3485]Optimize Grpc protocol for Java

Posted by "mxsm (via GitHub)" <gi...@apache.org>.
mxsm commented on PR #3746:
URL: https://github.com/apache/eventmesh/pull/3746#issuecomment-1510392979

   @xwm1992  PTAL! 
   design document Reference link issue or email that I had sended.


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

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


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


[GitHub] [eventmesh] xwm1992 commented on a diff in pull request #3746: [ISSUE #3485]Optimize Grpc protocol for Java

Posted by "xwm1992 (via GitHub)" <gi...@apache.org>.
xwm1992 commented on code in PR #3746:
URL: https://github.com/apache/eventmesh/pull/3746#discussion_r1221295528


##########
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/boot/EventMeshGrpcServer.java:
##########
@@ -126,6 +127,7 @@ public void init() throws Exception {
             .addService(new ProducerService(this, sendMsgExecutor))
             .addService(new ConsumerService(this, clientMgmtExecutor, replyMsgExecutor))
             .addService(new HeartbeatService(this, clientMgmtExecutor))
+            .addService(new PublisherService(this, clientMgmtExecutor))

Review Comment:
   why publisherService use the clientMgmtExecutor?



##########
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/grpc/processor/AbstructPublishBatchCloudEventProcessor.java:
##########
@@ -0,0 +1,105 @@
+/*
+ * 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.runtime.core.protocol.grpc.processor;
+
+import org.apache.eventmesh.api.exception.AclException;
+import org.apache.eventmesh.common.protocol.grpc.cloudevents.CloudEvent;
+import org.apache.eventmesh.common.protocol.grpc.cloudevents.CloudEventBatch;
+import org.apache.eventmesh.common.protocol.grpc.common.EventMeshCloudEventUtils;
+import org.apache.eventmesh.common.protocol.grpc.common.StatusCode;
+import org.apache.eventmesh.common.protocol.http.common.RequestCode;
+import org.apache.eventmesh.runtime.acl.Acl;
+import org.apache.eventmesh.runtime.boot.EventMeshGrpcServer;
+import org.apache.eventmesh.runtime.constants.EventMeshConstants;
+import org.apache.eventmesh.runtime.core.protocol.grpc.service.EventEmitter;
+import org.apache.eventmesh.runtime.core.protocol.grpc.service.ServiceUtils;
+
+import java.util.concurrent.TimeUnit;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import lombok.extern.slf4j.Slf4j;
+
+@Slf4j
+public abstract class AbstructPublishBatchCloudEventProcessor implements PublishProcessor<CloudEventBatch, CloudEvent> {

Review Comment:
   Class Name Abstruct -> Abstract



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

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


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


[GitHub] [eventmesh] mxsm commented on pull request #3746: [ISSUE #3485]Optimize Grpc protocol for Java

Posted by "mxsm (via GitHub)" <gi...@apache.org>.
mxsm commented on PR #3746:
URL: https://github.com/apache/eventmesh/pull/3746#issuecomment-1586215701

   @xwm1992  I have removed the useless 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: issues-unsubscribe@eventmesh.apache.org

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


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


[GitHub] [eventmesh] codecov[bot] commented on pull request #3746: [ISSUE #3485]Optimize Grpc protocol for Java

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #3746:
URL: https://github.com/apache/eventmesh/pull/3746#issuecomment-1586450790

   ## [Codecov](https://app.codecov.io/gh/apache/eventmesh/pull/3746?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   > Merging [#3746](https://app.codecov.io/gh/apache/eventmesh/pull/3746?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (192daa9) into [master](https://app.codecov.io/gh/apache/eventmesh/commit/d182e55aeaf890eb5df0d0e749ecff681563cd9e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (d182e55) will **increase** coverage by `2.61%`.
   > The diff coverage is `23.36%`.
   
   > :exclamation: Current head 192daa9 differs from pull request most recent head 76b6fce. Consider uploading reports for the commit 76b6fce to get more accurate results
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #3746      +/-   ##
   ============================================
   + Coverage     14.29%   16.91%   +2.61%     
   - Complexity     1326     1410      +84     
   ============================================
     Files           581      588       +7     
     Lines         28667    25743    -2924     
     Branches       2793     2376     -417     
   ============================================
   + Hits           4099     4355     +256     
   + Misses        24180    20954    -3226     
   - Partials        388      434      +46     
   ```
   
   
   | [Impacted Files](https://app.codecov.io/gh/apache/eventmesh/pull/3746?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [...entmesh/common/enums/EventMeshDataContentType.java](https://app.codecov.io/gh/apache/eventmesh/pull/3746?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXZlbnRtZXNoLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZXZlbnRtZXNoL2NvbW1vbi9lbnVtcy9FdmVudE1lc2hEYXRhQ29udGVudFR5cGUuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [...pache/eventmesh/common/protocol/HeartbeatItem.java](https://app.codecov.io/gh/apache/eventmesh/pull/3746?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXZlbnRtZXNoLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZXZlbnRtZXNoL2NvbW1vbi9wcm90b2NvbC9IZWFydGJlYXRJdGVtLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...he/eventmesh/common/protocol/SubscriptionMode.java](https://app.codecov.io/gh/apache/eventmesh/pull/3746?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXZlbnRtZXNoLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZXZlbnRtZXNoL2NvbW1vbi9wcm90b2NvbC9TdWJzY3JpcHRpb25Nb2RlLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...he/eventmesh/common/protocol/SubscriptionType.java](https://app.codecov.io/gh/apache/eventmesh/pull/3746?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXZlbnRtZXNoLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZXZlbnRtZXNoL2NvbW1vbi9wcm90b2NvbC9TdWJzY3JpcHRpb25UeXBlLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...h/common/protocol/grpc/cloudevents/CloudEvent.java](https://app.codecov.io/gh/apache/eventmesh/pull/3746?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXZlbnRtZXNoLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZXZlbnRtZXNoL2NvbW1vbi9wcm90b2NvbC9ncnBjL2Nsb3VkZXZlbnRzL0Nsb3VkRXZlbnQuamF2YQ==) | `9.34% <ø> (ø)` | |
   | [...mon/protocol/grpc/cloudevents/CloudEventBatch.java](https://app.codecov.io/gh/apache/eventmesh/pull/3746?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXZlbnRtZXNoLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZXZlbnRtZXNoL2NvbW1vbi9wcm90b2NvbC9ncnBjL2Nsb3VkZXZlbnRzL0Nsb3VkRXZlbnRCYXRjaC5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [...protocol/grpc/cloudevents/ConsumerServiceGrpc.java](https://app.codecov.io/gh/apache/eventmesh/pull/3746?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXZlbnRtZXNoLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZXZlbnRtZXNoL2NvbW1vbi9wcm90b2NvbC9ncnBjL2Nsb3VkZXZlbnRzL0NvbnN1bWVyU2VydmljZUdycGMuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [...rotocol/grpc/cloudevents/EventMeshGrpcService.java](https://app.codecov.io/gh/apache/eventmesh/pull/3746?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXZlbnRtZXNoLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZXZlbnRtZXNoL2NvbW1vbi9wcm90b2NvbC9ncnBjL2Nsb3VkZXZlbnRzL0V2ZW50TWVzaEdycGNTZXJ2aWNlLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...rotocol/grpc/cloudevents/HeartbeatServiceGrpc.java](https://app.codecov.io/gh/apache/eventmesh/pull/3746?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXZlbnRtZXNoLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZXZlbnRtZXNoL2NvbW1vbi9wcm90b2NvbC9ncnBjL2Nsb3VkZXZlbnRzL0hlYXJ0YmVhdFNlcnZpY2VHcnBjLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...rotocol/grpc/cloudevents/PublisherServiceGrpc.java](https://app.codecov.io/gh/apache/eventmesh/pull/3746?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXZlbnRtZXNoLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZXZlbnRtZXNoL2NvbW1vbi9wcm90b2NvbC9ncnBjL2Nsb3VkZXZlbnRzL1B1Ymxpc2hlclNlcnZpY2VHcnBjLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | ... and [47 more](https://app.codecov.io/gh/apache/eventmesh/pull/3746?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | |
   
   ... and [7 files with indirect coverage changes](https://app.codecov.io/gh/apache/eventmesh/pull/3746/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   


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

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


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


[GitHub] [eventmesh] xwm1992 commented on pull request #3746: [ISSUE #3485]Optimize Grpc protocol for Java

Posted by "xwm1992 (via GitHub)" <gi...@apache.org>.
xwm1992 commented on PR #3746:
URL: https://github.com/apache/eventmesh/pull/3746#issuecomment-1580345038

   @mxsm please solve the conflicts.


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

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


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


[GitHub] [eventmesh] mxsm commented on pull request #3746: [ISSUE #3485]Optimize Grpc protocol for Java

Posted by "mxsm (via GitHub)" <gi...@apache.org>.
mxsm commented on PR #3746:
URL: https://github.com/apache/eventmesh/pull/3746#issuecomment-1580925914

   @xwm1992  I will fix it later


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

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


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


[GitHub] [eventmesh] xwm1992 merged pull request #3746: [ISSUE #3485]Optimize Grpc protocol for Java

Posted by "xwm1992 (via GitHub)" <gi...@apache.org>.
xwm1992 merged PR #3746:
URL: https://github.com/apache/eventmesh/pull/3746


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