Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding dynamodb store implementation #75

Merged
merged 1 commit into from
Aug 5, 2016

Conversation

developmentalmadness
Copy link
Contributor

DynamoDB tests can be run against a local DynamoDB instance and by making sure that the following environment variables are set:

AWS_ACCESS_KEY_ID=anything_you_like
AWS_SECRET_ACCESS_KEY=anything-you-like
AWS_REGION=doesnt-matter-4-local
AWS_DYNAMODB_ENDPOINT=http://localhost:8000

The first three values are arbitrary unless you want to connect to an existing AWS account the last one is required to point to the host:port combination of where you're running DynamoDB local.

If you want to connect to an existing AWS account, make sure the first 3 variables are properly set and the fourth one (AWS_DYNAMODB_ENDPOINT) doesn't exist.

I use DynamoDB local for development and then AWS for good measure. Running against a live account allows you to check for throttling issues (no throttling on DynamoDB local).

@adrai
Copy link
Contributor

adrai commented Aug 4, 2016

Woow!
May I ask why or for what you use dgnamodb support?
You have some TODO statements... Should we wait for a merge?
thx

@developmentalmadness
Copy link
Contributor Author

developmentalmadness commented Aug 4, 2016

It's for a project using AWS Lambda. I've used Johnathan Oliver's project since it was beta so I'm really comfortable with it. The fact that there's an established test suite really made your version attractive.

The TODO statements are more for polish and possible performance improvements. The current implementation is very solid - it'll run against DynamoDB with read/write capacities only at 1. It takes about 22 minutes for the test suite to run if the tests don't hit the 20 second timeout so I wouldn't recommend it. That said, I'm confident in the current implementation since I ran the tests with as few resources as you can possibly allocate and it still works great. Then I only have to bump the write capacity up to 3-5 for the events/undispatched table to avoid throttling.

I have to finish some other tasks before I come around and clean it all up though. I'll leave it up to you. If you prefer to put it on a feature branch of some kind until I come back around that's fine.

@developmentalmadness
Copy link
Contributor Author

BTW, the reason the tests take so long when constrained is because of the clear code - it requires scanning the table and then batchWriteItem calls. Both use up a lot of resources but since they are being used only to run tests I don't think adding indexes to the schema is a good idea since they'll end up in production.

I tried to delete/create table instead but it takes a while to delete and allocate a new table after each test and caused more timeouts than the scans.

@adrai
Copy link
Contributor

adrai commented Aug 5, 2016

Ok… I think I will merge it… but I will not immediately publish a new version…

Am 04.08.2016 um 21:44 schrieb Mark J Miller <notifications@github.commailto:notifications@github.com>:

It's for a project using AWS Lambda. I've used Johnathan Oliver's project since it was beta so I'm really comfortable with it. The fact that there's an established test suite really made your version attractive.

The TODO statements are more for polish and possible performance improvements. The current implementation is very solid - it'll run against DynamoDB with read/write capacities only at 1. It takes about 22 minutes for the test suite to run if the tests don't hit the 20 second timeout so I wouldn't recommend it. That said, I'm confident in the current implementation. I have to finish some other tasks before I come around and clean it all up though. I'll leave it up to you. If you prefer to put it on a feature branch of some kind until I come back around that's fine.


You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com//pull/75#issuecomment-237661966, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABCS8gnwqmFu_sZgDA3xqhMjZSVnTdv9ks5qckEKgaJpZM4Jc6z1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants