|
1 | 1 | # OpenST Storage
|
2 | 2 |
|
3 |
| -It has DB storage libraries and respective services. It also contains shard management libraries and services. |
| 3 | +OpenST Storage contains DB storage libraries and respective services. It also contains data sharding libraries and services. |
4 | 4 | While OpenST Storage is available as-is for anyone to use, we caution that this is early stage software and under heavy ongoing development and improvement. Please report bugs and suggested improvements.
|
5 | 5 |
|
6 |
| -# OpenST Dynamodb Services |
| 6 | +# DynamoDB Services |
7 | 7 |
|
8 |
| -```bash |
| 8 | +For Parameters description please refer [AWS DynamoDB Docs](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB.html) |
9 | 9 |
|
10 |
| -For Parametes description refer - https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB.html |
| 10 | +```bash |
11 | 11 |
|
12 |
| -const OSTBase = require('@openstfoundation/openst-base') |
13 |
| - , DynamodbApiObject = new OSTBase.Dynamodb(DynamodbConnectionParams) |
| 12 | +const OSTStorage = require('@openstfoundation/openst-storage') |
| 13 | + , ddbServiceObj = new OSTStorage.Dynamodb(dynamodbConnectionParams) |
14 | 14 | ;
|
15 | 15 |
|
16 |
| - //Create Dynamodb Table |
17 |
| - DynamodbApiObject.DynamodbApiObject(createTableParams); |
| 16 | + //Create DynamoDB Table |
| 17 | + ddbServiceObj.createTable(createTableParams); |
18 | 18 |
|
19 | 19 | // Create Table Migration
|
20 | 20 | // 1. Creates table
|
21 |
| - // 2. Enables ContinuousBackup |
22 |
| - // 3. Enables read/write auto scaling |
23 |
| - // 4. Returns describe table response |
24 |
| - DynamodbApiObject.createTableMigration(createTableMigrationParams); |
| 21 | + // 2. Enables read/write auto scaling |
| 22 | + // 3. Returns describe table response |
| 23 | + ddbServiceObj.createTableMigration(createTableMigrationParams); |
25 | 24 |
|
26 |
| - // Update Dynamodb Table |
27 |
| - DynamodbApiObject.updateTable(updateTableParams) |
| 25 | + // Update DynamoDB Table |
| 26 | + ddbServiceObj.updateTable(updateTableParams) |
28 | 27 |
|
29 |
| - // Describe Dynamodb Table |
30 |
| - DynamodbApiObject.describeTable(describeTableParams) |
| 28 | + // Describe DynamoDB Table |
| 29 | + ddbServiceObj.describeTable(describeTableParams) |
31 | 30 |
|
32 |
| - // List Dynamodb Tables |
33 |
| - DynamodbApiObject.describeTable(listTableParams) |
| 31 | + // List DynamoDB Tables |
| 32 | + ddbServiceObj.describeTable(listTableParams) |
34 | 33 |
|
35 |
| - // Point in time recovery for Dynamodb Table |
36 |
| - DynamodbApiObject.updateContinuousBackup(updateConitnousParams) |
| 34 | + // Point in time recovery for DynamoDB Table |
| 35 | + ddbServiceObj.updateContinuousBackup(updateConitnousParams) |
37 | 36 |
|
38 |
| - // Delete Dynamodb table |
39 |
| - DynamodbApiObject.deleteTable(deleteTableParams) |
| 37 | + // Delete DynamoDB table |
| 38 | + ddbServiceObj.deleteTable(deleteTableParams) |
40 | 39 |
|
41 | 40 | // Batch Get Items
|
42 |
| - DynamodbApiObject.batchGet(batchGetParams) |
| 41 | + ddbServiceObj.batchGet(batchGetParams) |
43 | 42 |
|
44 | 43 | // Batch Write Items
|
45 |
| - DynamodbApiObject.batchWrite(batchWriteParams) |
| 44 | + ddbServiceObj.batchWrite(batchWriteParams) |
46 | 45 |
|
47 | 46 | // Query Items
|
48 |
| - DynamodbApiObject.query(queryParams) |
| 47 | + ddbServiceObj.query(queryParams) |
49 | 48 |
|
50 | 49 | // Scan Items
|
51 |
| - DynamodbApiObject.scan(queryParams) |
| 50 | + ddbServiceObj.scan(queryParams) |
52 | 51 |
|
53 | 52 | // Put Items
|
54 |
| - DynamodbApiObject.putItem(putItemParams) |
| 53 | + ddbServiceObj.putItem(putItemParams) |
55 | 54 |
|
56 | 55 | // Update an Item
|
57 |
| - DynamodbApiObject.updateItem(updateItemParams) |
| 56 | + ddbServiceObj.updateItem(updateItemParams) |
58 | 57 |
|
59 | 58 | // Delete Items
|
60 |
| - DynamodbApiObject.deleteItem(deleteItemParams) |
| 59 | + ddbServiceObj.deleteItem(deleteItemParams) |
61 | 60 |
|
62 |
| - // Check if table exists using wait for method |
63 |
| - DynamodbApiObject.tableExistsUsingWaitFor(tableExistsParams) |
| 61 | + // Check if table exists and is in ACTIVE state using wait for method |
| 62 | + ddbServiceObj.tableExistsUsingWaitFor(tableExistsParams) |
64 | 63 |
|
65 | 64 | // Check if table doesn't exists using wait for method
|
66 |
| - DynamodbApiObject.tableNotExistsUsingWaitFor(tableNotExistsParams) |
| 65 | + ddbServiceObj.tableNotExistsUsingWaitFor(tableNotExistsParams) |
67 | 66 |
|
68 | 67 | // Check if table exist in ACTIVE state using describe table method
|
69 | 68 | // If table is being created, then response will be false
|
70 |
| - DynamodbApiObject.checkTableExist(tableExistParams) |
| 69 | + ddbServiceObj.checkTableExist(tableExistParams) |
71 | 70 |
|
72 | 71 | ```
|
73 | 72 |
|
74 |
| -# OpenST Shard Management Services |
| 73 | +# Shard Management Services |
75 | 74 |
|
76 | 75 | ```bash
|
77 |
| -const OSTBase = require('@openstfoundation/openst-base') |
78 |
| - , DynamodbApiObject = new OSTBase.Dynamodb(DynamodbConnectionParams) |
79 |
| - , ShardManagementObject = DynamodbApiObject.shardManagement() |
| 76 | +const OSTStorage = require('@openstfoundation/openst-storage') |
| 77 | + , ddbServiceObj = new OSTStorage.Dynamodb(dynamodbConnectionParams) |
| 78 | + , shardMgmtObj = ddbServiceObj.shardManagement() |
80 | 79 | ;
|
81 | 80 |
|
82 | 81 | // Run Shard Migration
|
83 | 82 | // Created available_shards and managed_shards table
|
84 |
| - ShardManagementObject.runShardMigration(dynamoDbObject, autoScaleObj); |
| 83 | + shardMgmtObj.runShardMigration(dynamoDbObject, autoScaleObj); |
85 | 84 |
|
86 | 85 | // Add Shard
|
87 | 86 | // Creates item in available_shards table
|
88 |
| - ShardManagementObject.addShard(addShardParams); |
| 87 | + shardMgmtObj.addShard(addShardParams); |
89 | 88 |
|
90 | 89 | // Configure Shard
|
91 | 90 | // Configure Enable/Disable allocation type
|
92 |
| - ShardManagementObject.configureShard(configureShardParams); |
| 91 | + shardMgmtObj.configureShard(configureShardParams); |
93 | 92 |
|
94 | 93 | // Get Shards By Different Types
|
95 | 94 | // Type Values : all/enabled/disabled
|
96 |
| - ShardManagementObject.getShardsByType(getShardsByTypeParams); |
| 95 | + shardMgmtObj.getShardsByType(getShardsByTypeParams); |
97 | 96 |
|
98 | 97 | // Does this shard exist in available_shards table
|
99 |
| - ShardManagementObject.hasShard(hasShardParams); |
| 98 | + shardMgmtObj.hasShard(hasShardParams); |
100 | 99 |
|
101 | 100 | // Assign Shard to an identifier
|
102 | 101 | // Creates entry in managed_shards table
|
103 |
| - ShardManagementObject.assignShard(assignShardParams); |
| 102 | + shardMgmtObj.assignShard(assignShardParams); |
104 | 103 |
|
105 | 104 | // Get Managed shards
|
106 |
| - ShardManagementObject.getManagedShard(managedShardParams); |
| 105 | + shardMgmtObj.getManagedShard(managedShardParams); |
107 | 106 |
|
108 | 107 | ```
|
109 | 108 |
|
110 |
| -# OpenST Auto Scaling Services |
| 109 | +# Auto Scaling Services |
111 | 110 |
|
112 |
| -```bash |
| 111 | +For Parameters description please refer [AWS DynamoDB Docs](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/ApplicationAutoScaling.html) |
113 | 112 |
|
114 |
| -For Parametes description refer - https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/ApplicationAutoScaling.html |
| 113 | +```bash |
115 | 114 |
|
116 |
| -const OSTBase = require('@openstfoundation/openst-base') |
117 |
| - , AutoScalingObject = new OSTBase.AutoScaling(AutoScalingConnectionParams) |
| 115 | +const OSTStorage = require('@openstfoundation/openst-storage') |
| 116 | + , autoScalingObj = new OSTStorage.AutoScaling(autoScalingConnectionParams) |
118 | 117 | ;
|
119 | 118 |
|
120 |
| - // Registers or updates a scalable target. scalable target is a resource that Application Auto Scaling can scale out or scale in. After you have registered a scalable target, you can use this operation to update the minimum and maximum values for its scalable dimension. |
121 |
| - AutoScalingObject.registerScalableTarget(registerScalableTargetParams); |
| 119 | + // Registers or updates a scalable target. Scalable target is a resource that Application Auto Scaling can scale out or scale in. After you have registered a scalable target, you can use this operation to update the minimum and maximum values for its scalable dimension. |
| 120 | + autoScalingObj.registerScalableTarget(registerScalableTargetParams); |
122 | 121 |
|
123 | 122 | // Creates or updates a policy for an Application Auto Scaling scalable target
|
124 |
| - AutoScalingObject.putScalingPolicy(putScalingPolicyParams); |
| 123 | + autoScalingObj.putScalingPolicy(putScalingPolicyParams); |
125 | 124 |
|
126 | 125 | // Deletes the specified Application Auto Scaling scaling policy
|
127 |
| - AutoScalingObject.deleteScalingPolicy(deletecalingPolicyParams); |
| 126 | + autoScalingObj.deleteScalingPolicy(deletecalingPolicyParams); |
128 | 127 |
|
129 | 128 | // Deregistering a scalable target deletes the scaling policies that are associated with it.
|
130 |
| - AutoScalingObject.deregisterScalableTarget(deregisterScalableTargetParams); |
| 129 | + autoScalingObj.deregisterScalableTarget(deregisterScalableTargetParams); |
131 | 130 |
|
132 | 131 | // Gets information about the scalable targets in the specified namespace.
|
133 |
| - AutoScalingObject.describeScalableTargets(describeScalableTargetsParams); |
| 132 | + autoScalingObj.describeScalableTargets(describeScalableTargetsParams); |
134 | 133 |
|
135 | 134 | // Describes the scaling policies for the specified service namespace.
|
136 |
| - AutoScalingObject.describeScalingPolicies(describeScalingPoliciesParams); |
| 135 | + autoScalingObj.describeScalingPolicies(describeScalingPoliciesParams); |
137 | 136 |
|
138 | 137 | ```
|
0 commit comments