https://sdrioux.github.io/anagram/
##Project
- Node.js
- Express
- Dynamoose - AWS DynamoDB API Wrapper
- ApiDoc for documentation
- Istanbul for code coverage
- Tests with Mocha, Chai, and Sinon
Follow the instructions HERE to set up a local version of DynamoDB, or feel free to use the cloud version.
Note: Ingesting the full dictionary.txt file takes SEVERAL DAYS. We can not use the Dynamo BatchWriteItem command, as we check each word to see if it already exists in the database. Even if we could, BatchWriteItem only allows 25 writes at a time, and there are over 250,000 words in the dictionary. The loading function is currently commented out in index.js
.
npm install
# will use AWS DynamoDB
gulp start
# will use local AWS DynamoDB
gulp start-test
Tests are meant to be run against a local version of Dynamo, as opposed to the cloud version. The cloud version takes anywhere from 5-10 seconds to delete and recreate a table. We are resetting the table after every test, so as you can imagine, running the test suite can take a long time. The local version does not have this issue.
Performance running on my local environment hovered between 200-500ms per request. This is significantly slower than the advertised "single-digit millisecond latency at any scale", that AWS advertises. Supposedly, however, requests will be much faster if the server is hosted on EC2 in the same region as our Dynamo DB.