Is there a framework/tool which I could use in order to separate the database table creation from the business logic for DynamoDB? In the RDBMS world a tool like Liquibase would do the trick.
Any thoughts ?
Many thanks
You can use AWS CloudFormation to create the DynamoDB table. Here is the link which has the DynamoDB create template.
AWS CloudFormation simplifies provisioning and management on AWS.
AWS CloudFormation gives developers and systems administrators an easy
way to create and manage a collection of related AWS resources,
provisioning and updating them in an orderly and predictable fashion.
Dynamobee is a fork of mongobee, like a Liquibase, but use annotations in Java Classes. Available at https://github.com/dynamobee/dynamobee
Related
Can someone help me with a Database version control tool for AWS Dynamodb? Liquibase and Flyway cannot be used for dynamoDB. ANy help will be greatly appreciated.
At the moment we are using terraform to create and update the dynamodb table but we dont have a way of doing Database version control.
I am new to DynamoDB and trying to learn, while going through the docs I got a doubt whether DynamoDB is version agnostic or not also I want to know wether it is backwards compatible or not?
In addition I also want to know how to download local DynamoDB of different versions if possible and how can I change the version of DynamoDB in the webservice of aws ?
dynamoDB is a cloud hosted datastore. It it not a piece of software that you can download or install. As far as I know, there is no version, and you can't/don't have to select any version anywhere.
At most you can use some docker containers that mimics the behavior of dynamoDB to some extend. They are useful for testing and dev purposes, but keep in mind they are just mocks.
I need to configure cross-region replication for my DynamoDb table. To try in manually I just used AWS Web Console where I configured Global Table with appropriate regions for replication through DynamoDb streams, it was pretty simple. Could somebody please advice me how can I do it using Java SDK?
Bear in mind that DyanmoDB now supports global tables as announced on 29 November 2017. So you can probably replace your multitude of regional tables with global ones.
Global Tables eliminates the difficult work of replicating data
between regions and resolving update conflicts, enabling you to focus
on your application’s business logic. In addition, Global Tables
enables your applications to stay highly available even in the
unlikely event of isolation or degradation of an entire region.
However to answer you queston directly, its not part of the AWS DynamoDB Java SDK. You have to use the dynamodb-cross-region-library from AWS labs.
Cross-Region Replication
Important
AWS previously provided a cross-region replication solution based on
AWS CloudFormation. This solution has now been deprecated in favor of
an open source command line tool. For more information, please refer
to the detailed instructions on
GitHub:
https://github.com/awslabs/dynamodb-cross-region-library/blob/master/README.md
The DynamoDB cross-region replication solution uses the Amazon
DynamoDB Cross-Region Replication Library. This library uses DynamoDB
Streams to keep DynamoDB tables in sync across multiple regions in
near real time. When you write to a DynamoDB table in one region,
those changes are automatically propagated by the Cross-Region
Replication Library to your tables in other regions.
You can leverage the Cross-Region Replication Library in your own
applications, to build your own replication solutions with DynamoDB
Streams. For more information, and to download the source code, go to
the following GitHub repository:
https://github.com/awslabs/dynamodb-cross-region-library
I have a local and an azure ASP.NET Membership database. I need to be sync them both. Wondering if anyone has found a easy way to do this? The table structure seems simple enough but would rather pull from azure than push. Is there a routine or tool I do not know about to do this by now?
Thanks
-Ken
This would be a suitable job for the Microsoft Sync Framework.
You create a service or scheduled task that makes the necessary calls. Have this running on your server and you can pull from the Azure database and sync with the local one. It can be set up to sync one way or two ways.
Say I wanted to build a feed reader that downloads RSS and Atom feeds to your local computer and lets you view them locally. What are the respective advantages and disadvantages of using CouchDB or sqlite3 as the datastore for such an application?
SQLite and CouchDB are probably different in every respect but what you consider an advantage or disadvantage is a matter of preference and requirements.
SQLite is an SQL database where you store relations (tables).
CouchDB is a NoSQL database where you store JSON documents (objects of any structure).
SQLite has schemas.
CouchDB is schema-less.
SQLite is a library that you link with your application and use a C API.
CouchDB is a RESTful web service and its API is HTTP and JSON.
SQLite has no concept of a network.
CouchDB basically is a high performance web server.
SQLite is written in C.
CouchDB is written in Erlang.
Which of those are advantages and disadvantages? This is up to you. ;) Good luck.
Good summary from rsp. Without knowing more about your requirements, it's hard to say which one is better suited for your use case. One clear advantage that SQLite provides is that is has simpler installation and administration. As a library, it's linked into your application and installed along with your application. No separate database to install and configure. This is one of the features that makes database libraries, like SQLite and Berkeley DB very attractive, and possibly preferable to database servers.
Just to add to your list of considerations, Berkeley DB and Berkeley DB Java Edition are also database libraries that you may want to consider. Berkeley DB (written in C) offers you the choice of using a schema-free key-value pair API, a POJO-like Java API or a SQLite-compatible SQL API. Berkeley DB Java Edition (100% Java) offers you Java APIs for key-value pairs, Java Collections or POJO-like object persistence. Berkeley DB and SQLite tend to be the products of choice for people who are looking for embedding data management functionality inside of their application.
Disclaimer: I am the Product Manager for Berkeley DB, so I'm a little biased. :-)