You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ratis.apache.org by GitBox <gi...@apache.org> on 2020/07/13 18:49:34 UTC
[GitHub] [incubator-ratis] avijayanhwx commented on a change in pull request #139: RATIS-997: Benchmarking protobuffers and flatbuffers for streaming in GRPC
avijayanhwx commented on a change in pull request #139:
URL: https://github.com/apache/incubator-ratis/pull/139#discussion_r453855787
##########
File path: ratis-examples/README.md
##########
@@ -138,6 +138,21 @@ for server: `java -cp target/*.jar org.apache.ratis.examples.counter.server.Coun
replace {serverIndex} with 1, 2, or 3
for client: `java -cp target/*.jar org.apache.ratis.examples.counter.client.CounterClient`
+## Example 4: Data Transfer
Review comment:
This needs to be removed.
##########
File path: ratis-experiments/README.md
##########
@@ -0,0 +1,43 @@
+<!--
+ Licensed 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. See accompanying LICENSE file.
+-->
+
+# Apache Ratis Experiments
+
+#### Building and Running The Examples
+
+The repository can be complied using `mvn clean package -DskipTests -DbuildExp` under the project root directory;
+see also [BUILDING.md](../BUILDING.md).
+
+This module contains the experiments carried out while building the project.
Review comment:
nit. This module has been created to house experimental projects.
##########
File path: ratis-experiments/pom.xml
##########
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed 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. See accompanying LICENSE file.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>ratis</artifactId>
+ <groupId>org.apache.ratis</groupId>
+ <version>0.6.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>ratis-experiments</artifactId>
+ <name>Apache Ratis Experiments</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.ratis</groupId>
+ <artifactId>ratis-thirdparty-misc</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ratis</groupId>
+ <artifactId>ratis-proto</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
+ <version>3.5</version>
Review comment:
Can we check if we can use <commons.lang.version> defined in parent pom?
##########
File path: ratis-experiments/src/main/java/org/apache/ratis/experiments/flatbuffers/client/ClientFlat.java
##########
@@ -0,0 +1,129 @@
+/**
+ * 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.ratis.experiments.flatbuffers.client;
+
+import org.apache.ratis.thirdparty.com.google.flatbuffers.FlatBufferBuilder;
+import org.apache.ratis.thirdparty.io.grpc.Channel;
+import org.apache.ratis.thirdparty.io.grpc.ManagedChannel;
+import org.apache.ratis.thirdparty.io.grpc.ManagedChannelBuilder;
+import org.apache.ratis.thirdparty.io.grpc.Status;
+import org.apache.ratis.thirdparty.io.grpc.stub.StreamObserver;
+import org.apache.ratis.flatbufs.FileTransferGrpc;
+import org.apache.ratis.flatbufs.TransferMsg;
+import org.apache.ratis.flatbufs.TransferReply;
+
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import java.util.concurrent.Semaphore;
+import java.util.concurrent.TimeUnit;
+
+
+
Review comment:
nit. Java doc.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org