szaszm commented on a change in pull request #975:
URL: https://github.com/apache/nifi-minifi-cpp/pull/975#discussion_r569365865



##########
File path: extensions/aws/s3/S3ClientRequestSender.h
##########
@@ -0,0 +1,47 @@
+/**
+ * @file S3Wrapper.h
+ * S3Wrapper class declaration
+ *
+ * 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.
+ */
+#pragma once
+
+#include "S3RequestSender.h"
+
+namespace org {
+namespace apache {
+namespace nifi {
+namespace minifi {
+namespace aws {
+namespace s3 {
+
+class S3ClientRequestSender : public S3RequestSender {
+ public:
+  minifi::utils::optional<Aws::S3::Model::PutObjectResult> 
sendPutObjectRequest(const Aws::S3::Model::PutObjectRequest& request) override;
+  bool sendDeleteObjectRequest(const Aws::S3::Model::DeleteObjectRequest& 
request) override;
+  minifi::utils::optional<Aws::S3::Model::GetObjectResult> 
sendGetObjectRequest(const Aws::S3::Model::GetObjectRequest& request) override;
+  minifi::utils::optional<Aws::S3::Model::ListObjectsV2Result> 
sendListObjectsRequest(const Aws::S3::Model::ListObjectsV2Request& request) 
override;
+  minifi::utils::optional<Aws::S3::Model::ListObjectVersionsResult> 
sendListVersionsRequest(const Aws::S3::Model::ListObjectVersionsRequest& 
request) override;
+  minifi::utils::optional<Aws::S3::Model::GetObjectTaggingResult> 
sendGetObjectTaggingRequest(const Aws::S3::Model::GetObjectTaggingRequest& 
request) override;
+  minifi::utils::optional<Aws::S3::Model::HeadObjectResult> 
sendHeadObjectRequest(const Aws::S3::Model::HeadObjectRequest& request) 
override;
+};

Review comment:
       Regarding S3 client, if it's cheap to create, then I would go for 
solution 2, otherwise solution 1. But you're more familiar with the ecosystem, 
so I trust your judgement.
   
   In any case, an easy future-proofing (pun intended) could be to wrap the 
current solution in `async(deferred, ...)` and convert to actual async later. 
After giving this a second thought, async conversion would probably require 
other changes as well, so this may not be a good idea after all.
   
   It's your call whether you see any value in any of the ideas raised. I'm 
fine with no changes as well.




----------------------------------------------------------------
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:
[email protected]


Reply via email to