DynamoDB

An AWS DynamoDB persistence connection can be used to connect your Active Caching module to a DynamoDB database. This allows modules to persist modifications to DynamoDB and retrieve saved values when the module first creates an object.

To connect to a DynamoDB database, you need to supply a set of credentials for an AWS account that has AWS permissions to create/access/modify tables and create/read/update/delete items. The AWS credentials are provided through the UI when you create a new DynamoDB connector and consist of:

  • AWS Region: the region in which the instances will be persisted.

  • AWS Access Key Id: the access key Id of the account used to access the DynamoDB table.

  • AWS Secret Access Key: the secret key associated with the account used to access the DynamoDB table.

  • Table Name: the name of the DynamoDB table to be used for persisting instances (“ScaleoutModuleInstances” is the suggested name for easy identification).

Here is a screenshot of the dialog in the ScaleOut Active Caching UI for creating a DynamoDB connection:

dynamodb_config_image

You can deploy the connector immediately after it is created, or you can deploy it at a later time. The connector authenticates with AWS and the DynamoDB table when it is deployed.

Note

If the table does not already exist, it will automatically be created when a module that uses the connection is deployed.

Enable DynamoDB Persistence for a Module

When launching your model through the ScaleOut Active Caching UI, you can enable persistence by selecting the DynamoDB persistence provider you have defined above. If write-through is enabled, this will cause instances in your module to periodically persist themselves to DynamoDB every five seconds (if the object has been modified). If read-through is enabled, this will cause instances to retrieve their state from DynamoDB when they are first created.

dynamodb_deploy_module_image