Skip to content

Commit d2f9c17

Browse files
author
Abhay Kumar Singh
authored
Merge pull request #4 from OpenSTFoundation/develop
Merge of develop to master
2 parents 5cb5c86 + f90ff3a commit d2f9c17

38 files changed

+488
-440
lines changed

.jsdoc.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"tags": {
3+
"allowUnknownTags": true
4+
},
5+
"source": {
6+
"include": ["config/", "lib/", "services/"],
7+
"exclude": [],
8+
"includePattern": ".+\\.js(doc|x)?$",
9+
"excludePattern": "(^|\\/|\\\\)_"
10+
},
11+
"plugins": [
12+
"jsdoc-route-plugin"
13+
],
14+
"recurseDepth": 5,
15+
"templates": {
16+
"systemName" : "OpenST Storage",
17+
"footer" : "<style>.copyright, .jsdoc-message, footer { color: #555555;} footer { border-color:#eeeeee;} }</style>",
18+
"copyright" : "OpenST Foundation Ltd.",
19+
"includeDate" : false,
20+
"theme" : "lumen",
21+
"navType" : "vertical",
22+
"linenums" : true,
23+
"cleverLinks" : true,
24+
"monospaceLinks" : true,
25+
"default": {
26+
"outputSourceFiles": true
27+
}
28+
},
29+
"opts": {
30+
"destination": "./docs/",
31+
"encoding": "utf8",
32+
"private": true,
33+
"recurse": true,
34+
"template": "./node_modules/ink-docstrap/template",
35+
"readme": "./README.md"
36+
}
37+
}

CHANGELOG.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
## OpenST-Storage v1.0.0-beta.1 (23 May 2018)
1+
## OpenST-Storage v1.0.0 (24 May 2018)
22

3-
- OpenST Storage repository is created. Its main purpose is to provide storage related services.
4-
- Dynamodb services to create, put, get, update, delete and many other dynamodb related services is added.
5-
- Auto Scale services to scale tables in AWS is added.
6-
- Client side Shard Management services is added to manage scalable tables.
7-
- Cache multi management added for services performing data retrieval.
3+
- OpenST Storage contains storage and sharding related services.
4+
- Auto Scale services to scale read/write capacity of DynamoDB tables.
5+
- Cache layer on top of Shard management services.

README.md

Lines changed: 55 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,138 +1,137 @@
11
# OpenST Storage
22

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.
44
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.
55

6-
# OpenST Dynamodb Services
6+
# DynamoDB Services
77

8-
```bash
8+
For Parameters description please refer [AWS DynamoDB Docs](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB.html)
99

10-
For Parametes description refer - https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB.html
10+
```bash
1111

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)
1414
;
1515

16-
//Create Dynamodb Table
17-
DynamodbApiObject.DynamodbApiObject(createTableParams);
16+
//Create DynamoDB Table
17+
ddbServiceObj.createTable(createTableParams);
1818

1919
// Create Table Migration
2020
// 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);
2524

26-
// Update Dynamodb Table
27-
DynamodbApiObject.updateTable(updateTableParams)
25+
// Update DynamoDB Table
26+
ddbServiceObj.updateTable(updateTableParams)
2827

29-
// Describe Dynamodb Table
30-
DynamodbApiObject.describeTable(describeTableParams)
28+
// Describe DynamoDB Table
29+
ddbServiceObj.describeTable(describeTableParams)
3130

32-
// List Dynamodb Tables
33-
DynamodbApiObject.describeTable(listTableParams)
31+
// List DynamoDB Tables
32+
ddbServiceObj.describeTable(listTableParams)
3433

35-
// Point in time recovery for Dynamodb Table
36-
DynamodbApiObject.updateContinuousBackup(updateConitnousParams)
34+
// Point in time recovery for DynamoDB Table
35+
ddbServiceObj.updateContinuousBackup(updateConitnousParams)
3736

38-
// Delete Dynamodb table
39-
DynamodbApiObject.deleteTable(deleteTableParams)
37+
// Delete DynamoDB table
38+
ddbServiceObj.deleteTable(deleteTableParams)
4039

4140
// Batch Get Items
42-
DynamodbApiObject.batchGet(batchGetParams)
41+
ddbServiceObj.batchGet(batchGetParams)
4342

4443
// Batch Write Items
45-
DynamodbApiObject.batchWrite(batchWriteParams)
44+
ddbServiceObj.batchWrite(batchWriteParams)
4645

4746
// Query Items
48-
DynamodbApiObject.query(queryParams)
47+
ddbServiceObj.query(queryParams)
4948

5049
// Scan Items
51-
DynamodbApiObject.scan(queryParams)
50+
ddbServiceObj.scan(queryParams)
5251

5352
// Put Items
54-
DynamodbApiObject.putItem(putItemParams)
53+
ddbServiceObj.putItem(putItemParams)
5554

5655
// Update an Item
57-
DynamodbApiObject.updateItem(updateItemParams)
56+
ddbServiceObj.updateItem(updateItemParams)
5857

5958
// Delete Items
60-
DynamodbApiObject.deleteItem(deleteItemParams)
59+
ddbServiceObj.deleteItem(deleteItemParams)
6160

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

6564
// Check if table doesn't exists using wait for method
66-
DynamodbApiObject.tableNotExistsUsingWaitFor(tableNotExistsParams)
65+
ddbServiceObj.tableNotExistsUsingWaitFor(tableNotExistsParams)
6766
6867
// Check if table exist in ACTIVE state using describe table method
6968
// If table is being created, then response will be false
70-
DynamodbApiObject.checkTableExist(tableExistParams)
69+
ddbServiceObj.checkTableExist(tableExistParams)
7170
7271
```
7372
74-
# OpenST Shard Management Services
73+
# Shard Management Services
7574
7675
```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()
8079
;
8180
8281
// Run Shard Migration
8382
// Created available_shards and managed_shards table
84-
ShardManagementObject.runShardMigration(dynamoDbObject, autoScaleObj);
83+
shardMgmtObj.runShardMigration(dynamoDbObject, autoScaleObj);
8584
8685
// Add Shard
8786
// Creates item in available_shards table
88-
ShardManagementObject.addShard(addShardParams);
87+
shardMgmtObj.addShard(addShardParams);
8988
9089
// Configure Shard
9190
// Configure Enable/Disable allocation type
92-
ShardManagementObject.configureShard(configureShardParams);
91+
shardMgmtObj.configureShard(configureShardParams);
9392
9493
// Get Shards By Different Types
9594
// Type Values : all/enabled/disabled
96-
ShardManagementObject.getShardsByType(getShardsByTypeParams);
95+
shardMgmtObj.getShardsByType(getShardsByTypeParams);
9796
9897
// Does this shard exist in available_shards table
99-
ShardManagementObject.hasShard(hasShardParams);
98+
shardMgmtObj.hasShard(hasShardParams);
10099
101100
// Assign Shard to an identifier
102101
// Creates entry in managed_shards table
103-
ShardManagementObject.assignShard(assignShardParams);
102+
shardMgmtObj.assignShard(assignShardParams);
104103
105104
// Get Managed shards
106-
ShardManagementObject.getManagedShard(managedShardParams);
105+
shardMgmtObj.getManagedShard(managedShardParams);
107106
108107
```
109108
110-
# OpenST Auto Scaling Services
109+
# Auto Scaling Services
111110
112-
```bash
111+
For Parameters description please refer [AWS DynamoDB Docs](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/ApplicationAutoScaling.html)
113112
114-
For Parametes description refer - https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/ApplicationAutoScaling.html
113+
```bash
115114
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)
118117
;
119118
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);
122121
123122
// Creates or updates a policy for an Application Auto Scaling scalable target
124-
AutoScalingObject.putScalingPolicy(putScalingPolicyParams);
123+
autoScalingObj.putScalingPolicy(putScalingPolicyParams);
125124
126125
// Deletes the specified Application Auto Scaling scaling policy
127-
AutoScalingObject.deleteScalingPolicy(deletecalingPolicyParams);
126+
autoScalingObj.deleteScalingPolicy(deletecalingPolicyParams);
128127
129128
// Deregistering a scalable target deletes the scaling policies that are associated with it.
130-
AutoScalingObject.deregisterScalableTarget(deregisterScalableTargetParams);
129+
autoScalingObj.deregisterScalableTarget(deregisterScalableTargetParams);
131130
132131
// Gets information about the scalable targets in the specified namespace.
133-
AutoScalingObject.describeScalableTargets(describeScalableTargetsParams);
132+
autoScalingObj.describeScalableTargets(describeScalableTargetsParams);
134133
135134
// Describes the scaling policies for the specified service namespace.
136-
AutoScalingObject.describeScalingPolicies(describeScalingPoliciesParams);
135+
autoScalingObj.describeScalingPolicies(describeScalingPoliciesParams);
137136
138137
```

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.0.0

config/api_error_config.json

Lines changed: 0 additions & 22 deletions
This file was deleted.

config/core_constants.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
*/
99

1010
const rootPrefix = '..'
11-
, paramErrorConfig = require(rootPrefix + '/config/param_error_config')
12-
, apiErrorConfig = require(rootPrefix + '/config/api_error_config')
11+
, paramErrorConfig = require(rootPrefix + '/config/error/param')
12+
, apiErrorConfig = require(rootPrefix + '/config/error/general')
1313
;
1414

1515
/**

0 commit comments

Comments
 (0)