akka / alpakka

Alpakka is a Reactive Enterprise Integration library for Java and Scala, based on Reactive Streams and Akka.
https://doc.akka.io/docs/alpakka/current/
Other
1.26k stars 645 forks source link

Dynamo Client Dax Support #2115

Open siddddhant opened 4 years ago

siddddhant commented 4 years ago

Can we configure DAX host in dynamo client ? According to AWS documentation, we just need to add endpoint configuration to enable call via DAX.

seglo commented 4 years ago

Hi @siddddhant. I did some digging and found that the DAX client is not supported by the AWS SDK v2, which we depend on for the DynamoDb connector. You can find out more here: https://github.com/aws/aws-sdk-java-v2/issues/473

For reference: DAX Developer Guide: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DAX.client.run-application-java.html

teroxik commented 4 years ago

It's not as simple as enabling the endpoint as it depends if you want to use the query cache or write trough cache. In real use cases you almost always want to control if you go through DAX or not - that's possible even though there is a strong consistency for the query side which means that the client will always go directly to the dynamo table. There are bit of more caveats around the the TTL of the caches and testing. My knowledge can be a bit outdated as I used DAX extensively around 2 years ago, but the java client was not great and it was CBOR only as well so it was causing problems with testing environment and integration with localstack for example. https://aws.amazon.com/blogs/database/amazon-dynamodb-accelerator-dax-a-read-throughwrite-through-cache-for-dynamodb/ not sure if they have simplified the approach as it seems there is no documentation on the main page