Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3536072
D3950.id12410.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
5 KB
Referenced Files
None
Subscribers
None
D3950.id12410.diff
View Options
diff --git a/services/backup/src/Constants.h b/services/backup/src/Constants.h
--- a/services/backup/src/Constants.h
+++ b/services/backup/src/Constants.h
@@ -7,23 +7,6 @@
namespace comm {
namespace network {
-// 4MB limit
-// WARNING: use keeping in mind that grpc adds its own headers to messages
-// https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md
-// so the message that actually is being sent over the network looks like this
-// [Compressed-Flag] [Message-Length] [Message]
-// [Compressed-Flag] 1 byte - added by grpc
-// [Message-Length] 4 bytes - added by grpc
-// [Message] N bytes - actual data
-// so for every message we get 5 additional bytes of data
-// as mentioned here
-// https://github.com/grpc/grpc/issues/15734#issuecomment-396962671
-// grpc stream may contain more than one message
-const size_t GRPC_CHUNK_SIZE_LIMIT = 4 * 1024 * 1024;
-const size_t GRPC_METADATA_SIZE_PER_MESSAGE = 5;
-
-const std::string AWS_REGION = "us-east-2";
-
const std::string LOG_TABLE_NAME = decorateTableName("backup-service-log");
const std::string BACKUP_TABLE_NAME =
decorateTableName("backup-service-backup");
diff --git a/services/backup/src/Reactors/client/blob/BlobPutClientReactor.h b/services/backup/src/Reactors/client/blob/BlobPutClientReactor.h
--- a/services/backup/src/Reactors/client/blob/BlobPutClientReactor.h
+++ b/services/backup/src/Reactors/client/blob/BlobPutClientReactor.h
@@ -1,6 +1,7 @@
#pragma once
#include "Constants.h"
+#include "GlobalConstants.h"
#include "../_generated/blob.grpc.pb.h"
#include "../_generated/blob.pb.h"
diff --git a/services/blob/src/AwsS3Bucket.cpp b/services/blob/src/AwsS3Bucket.cpp
--- a/services/blob/src/AwsS3Bucket.cpp
+++ b/services/blob/src/AwsS3Bucket.cpp
@@ -1,5 +1,6 @@
#include "AwsS3Bucket.h"
#include "Constants.h"
+#include "GlobalConstants.h"
#include "MultiPartUploader.h"
#include "S3Tools.h"
#include "Tools.h"
diff --git a/services/blob/src/Constants.h b/services/blob/src/Constants.h
--- a/services/blob/src/Constants.h
+++ b/services/blob/src/Constants.h
@@ -7,24 +7,9 @@
namespace comm {
namespace network {
-// 4MB limit
-// WARNING: use keeping in mind that grpc adds its own headers to messages
-// https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md
-// so the message that actually is being sent over the network looks like this
-// [Compressed-Flag] [Message-Length] [Message]
-// [Compressed-Flag] 1 byte - added by grpc
-// [Message-Length] 4 bytes - added by grpc
-// [Message] N bytes - actual data
-// so for every message we get 5 additional bytes of data
-// as mentioned here
-// https://github.com/grpc/grpc/issues/15734#issuecomment-396962671
-// grpc stream may contain more than one message
-const size_t GRPC_CHUNK_SIZE_LIMIT = 4 * 1024 * 1024;
-const size_t GRPC_METADATA_SIZE_PER_MESSAGE = 5;
// 5MB limit
const size_t AWS_MULTIPART_UPLOAD_MINIMUM_CHUNK_SIZE = 5 * 1024 * 1024;
-const std::string AWS_REGION = "us-east-2";
const std::string BLOB_BUCKET_NAME = "commapp-blob";
const std::string BLOB_TABLE_NAME = decorateTableName("blob-service-blob");
diff --git a/services/blob/src/Reactors/server/GetReactor.h b/services/blob/src/Reactors/server/GetReactor.h
--- a/services/blob/src/Reactors/server/GetReactor.h
+++ b/services/blob/src/Reactors/server/GetReactor.h
@@ -1,5 +1,6 @@
#pragma once
+#include "GlobalConstants.h"
#include "S3Tools.h"
#include "ServerWriteReactorBase.h"
diff --git a/services/blob/src/S3Tools.cpp b/services/blob/src/S3Tools.cpp
--- a/services/blob/src/S3Tools.cpp
+++ b/services/blob/src/S3Tools.cpp
@@ -1,5 +1,6 @@
#include "S3Tools.h"
#include "Constants.h"
+#include "GlobalConstants.h"
#include "Tools.h"
#include <aws/s3/model/Bucket.h>
diff --git a/services/blob/src/Tools.cpp b/services/blob/src/Tools.cpp
--- a/services/blob/src/Tools.cpp
+++ b/services/blob/src/Tools.cpp
@@ -3,6 +3,7 @@
#include "Constants.h"
#include "DatabaseEntitiesTools.h"
#include "DatabaseManager.h"
+#include "GlobalConstants.h"
#include "S3Tools.h"
#include <openssl/sha.h>
diff --git a/services/lib/src/DynamoDBTools.cpp b/services/lib/src/DynamoDBTools.cpp
--- a/services/lib/src/DynamoDBTools.cpp
+++ b/services/lib/src/DynamoDBTools.cpp
@@ -1,5 +1,6 @@
#include "DynamoDBTools.h"
#include "Constants.h"
+#include "GlobalConstants.h"
namespace comm {
namespace network {
diff --git a/services/blob/src/Constants.h b/services/lib/src/GlobalConstants.h
copy from services/blob/src/Constants.h
copy to services/lib/src/GlobalConstants.h
--- a/services/blob/src/Constants.h
+++ b/services/lib/src/GlobalConstants.h
@@ -1,7 +1,5 @@
#pragma once
-#include "Tools.h"
-
#include <string>
namespace comm {
@@ -21,15 +19,8 @@
// grpc stream may contain more than one message
const size_t GRPC_CHUNK_SIZE_LIMIT = 4 * 1024 * 1024;
const size_t GRPC_METADATA_SIZE_PER_MESSAGE = 5;
-// 5MB limit
-const size_t AWS_MULTIPART_UPLOAD_MINIMUM_CHUNK_SIZE = 5 * 1024 * 1024;
const std::string AWS_REGION = "us-east-2";
-const std::string BLOB_BUCKET_NAME = "commapp-blob";
-
-const std::string BLOB_TABLE_NAME = decorateTableName("blob-service-blob");
-const std::string REVERSE_INDEX_TABLE_NAME =
- decorateTableName("blob-service-reverse-index");
} // namespace network
} // namespace comm
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 26, 5:25 PM (12 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2704042
Default Alt Text
D3950.id12410.diff (5 KB)
Attached To
Mode
D3950: [services] Lib - Introduce Global Constants
Attached
Detach File
Event Timeline
Log In to Comment