PynamoDB
PynamoDB copied to clipboard
Do PynamoDB support AWS DAX ?
I am using PynamoDB for accessing my AWS DynamoDB tables, Now I need to implement the caching via AWS DAX .
Does PynamoDB support DAX , even if some source code changes are required to make it work , I can do it myself too. Kindly guide me accordingly.
We don't currently support DAX, though I'd be open to adding support! I took a quick look and couldn't find the python client source, but if you want to do some research I'll be happy to discuss the best approach.
It's supposed to be a near drop-in replacement to boto3, so you can expect the same output as a regular boto3 DynamoDB call. The only thing that's changed is how you call the API.
With Boto3/PynamoDB, you use an https request, with DAX, you need to construct the socket manually, no TLS.
You can view the source here: https://pypi.org/project/amazon-dax-client/#files
AmazonDaxClient.py
is the file of interest, it acts as the abstraction layer for API calls.
Cluster.py
and Tube.py
show how the sockets are made. It's actually quite clever because TLS operations have such huge relative overhead.
We don't currently support DAX, though I'd be open to adding support! I took a quick look and couldn't find the python client source, but if you want to do some research I'll be happy to discuss the best approach.
Looks like a PR for this already exists:
https://github.com/pynamodb/PynamoDB/pull/470
https://github.com/uncovertruth/PynamoDB/pull/2
Are there any plans to add this to pynamodb officially?
https://stackoverflow.com/questions/57853904/do-pynamodb-support-aws-dax
+1 for this.
We don't currently support DAX, though I'd be open to adding support! I took a quick look and couldn't find the python client source, but if you want to do some research I'll be happy to discuss the best approach.
@garrettheel I'm sure you're aware by now, but here's the official Python client from AWS: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DAX.client.run-application-python.html
+1 for this.
We don't currently support DAX, though I'd be open to adding support! I took a quick look and couldn't find the python client source, but if you want to do some research I'll be happy to discuss the best approach.
@garrettheel I'm sure you're aware by now, but here's the official Python client from AWS: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DAX.client.run-application-python.html
@corleymj Yep, I am aware of this. Counter to the usual AWS approach, DAX was released in a proprietary way (no source available, not documented). As long as DAX isn't supported through botocore
, which PynamoDB is built on top of, it's unlikely that we'll add support to the core. Frankly I'm pretty disappointed in their decision to build it this way, since I'd like to support it if it were more practical.
Was wondering if DAX support is in the feature roadmap at all for this project. Been a couple years since the last update