DynamoDB
Amazon DynamoDB is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability. DynamoDB is ideal for applications that require low-latency data access at any scale, supporting both document and key-value data models. When paired with Martini Runtime, an advanced execution environment optimized for data-intensive tasks, DynamoDB's capabilities are enhanced, enabling organizations to handle large-scale data operations efficiently. This combination ensures high performance and scalability for real-time analytics and data processing.
Configuring DynamoDB
Configuring DynamoDB with Martini Runtime involves integrating DynamoDB’s scalable NoSQL database with Martini Runtime’s execution environment to streamline data processing and analytics workflows. Set up your DynamoDB environment with tables, indexes, and access configurations. Then, configure Martini Runtime to handle data-intensive tasks and workflows to ensure efficient processing of DynamoDB data. Below is a guide to adding a new database connection:
Configuration Guide
Via API Explorer: You can configure database connections using the Martini API Explorer, which provides an easy-to-use interface for interacting with the system's APIs. To configure DynamoDB connections through the API Explorer:
-
Access the API Explorer: Open a browser and navigate to
[HOST]:8080/api-explorer/
to access the API Explorer. -
Navigate to the Database Tag: Look for and click on the
database
tag within the API Explorer to see various database configuration endpoints. -
Configure Connection Pool: Use the
esbapi/databases
endpoint under the database tag to save a DynamoDB connection pool. -
Use POST to Save a Connection Pool: Save the connection pool by sending a POST request to the
/esbapi/databases
endpoint. Below is an example JSON payload for DynamoDB configuration:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
{ "name": "[name]", "autoStart": false, "type": "dynamodb", "endpoint": "[dynamodb-endpoint]", "authenticationProvider": "AUTO", "connectionSettings": { "maxConcurrency": 3, "maxPendingConnectionAcquires": 32, "connectionTimeToLive": 20000, "readTimeout": 20000, "writeTimeout": 20000, "connectionTimeout": 20000, "connectionAcquisitionTimeout": 20000, "connectionMaxIdleTime": 20000, "useIdleConnectionReaper": true } }
Via File System:
Alternatively, DynamoDB connections can be modified directly in the file system by editing the <name>.dbxml
file located in the /<martini-home>/conf/db-pool/
directory. The <name>.dbxml
file is specific to your DynamoDB configuration. This approach is useful in environments where API access is restricted or during initial setup.
To configure DynamoDB connections via the file system:
-
Locate the Configuration File: Go to the
/<martini-home>/conf/db-pool/
directory on your server and find the<name>.dbxml
file. -
Edit the DynamoDB Connections: Open the
<name>.dbxml
file in a text editor and modify the DynamoDB connection properties. -
Save and Restart: After modifying the connection details, save the file. Restart the Martini Runtime instance to apply the changes, ensuring all components use the updated configuration. Here is a basic example of a dbXML file for DynamoDB:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
<database> <name>[name]</name> <autoStart>false</autoStart> <type>dynamodb</type> <endpoint>[dynamodb-endpoint]</endpoint> <authenticationProvider>AUTO</authenticationProvider> <connectionSettings> <maxConcurrency>3</maxConcurrency> <maxPendingConnectionAcquires>32</maxPendingConnectionAcquires> <connectionTimeToLive>20000</connectionTimeToLive> <readTimeout>20000</readTimeout> <writeTimeout>20000</writeTimeout> <connectionTimeout>20000</connectionTimeout> <connectionAcquisitionTimeout>20000</connectionAcquisitionTimeout> <connectionMaxIdleTime>20000</connectionMaxIdleTime> <useIdleConnectionReaper>true</useIdleConnectionReaper> </connectionSettings> </database>
Via Martini Designer:
-
Open Martini Designer: Launch Martini Designer and navigate to the Database section in the Navigator view. This will show the available database connections and related configuration options.
-
Add New Connection: Right-click on Connections and select the option to Add New Connection.
-
Specify Connection Name and Type: Provide a name for your DynamoDB connection and select
AWS DynamoDB
as the database type from the dropdown menu. -
Enter Connection Details:
Fill in the required fields for your DynamoDB connection: - Name: Choose a unique name for the connection.
- Endpoint: Enter the DynamoDB endpoint URL (e.g.,
https://dynamodb.us-west-2.amazonaws.com
). - Authentication Provider:
Choose one of the following authentication providers and fill in the corresponding details:
- Auto: Automatically detects the best available credentials.
- Static: Enter a static AWS Access Key ID and Secret Access Key.
- Anonymous: No authentication is required.
- System Property: Use system properties to provide credentials.
- Environmental Variable: Provide credentials from environment variables.
- Credential Profile: Use a specific AWS credential profile stored in your local AWS configuration.
- ECS Container Credential: Use credentials associated with an ECS container task role.
- EC2 Instance Profile: Use credentials provided by an EC2 instance profile.
-
Test the Connection:
Before saving the connection, it’s recommended to test the connection to ensure everything is configured correctly. Click the Test Connection button to verify that Martini Designer can successfully connect to DynamoDB. -
Save the Connection:
Once the connection test is successful, click Save to establish the connection. Martini Designer will automatically generate and save the appropriate configuration files.
Connection Properties
For more information on constructing DynamoDB connection parameters, refer to the official documentation: AWS SDK for DynamoDB.
Database Properties
These properties control various aspects of DynamoDB’s operation, including table configuration, indexing, and access controls. For detailed information on how to configure these settings, consult the AWS DynamoDB documentation.