Not familiar with nested sets? Read this.
With the switch to event streams, we will switch to calculating the nested sets on the fly on our side as opposed to receiving them in full from the source every time a change is made.
- App must be implemented in NodeJS
- Read full
test.treetable into a program. Calculate the lft and rgt values for the nested sets. Result should match the lft and rgt values in thetest.treetable.
Challenge needs to be completed outside of regular work hours. We suggest spending at least 2 hours on the challenge but no more than roughly 5 hours.
Consideration will be given to the following for scoring:
- Program runs and completes the calculation of the nested sets (lft, rgt) values
- Correctness of the nested sets
- Average Speed of execution over multiple iterations
- Use of proper idiomatic patterns in NodeJS
- Promises
- async/await
- Dependency Injection
- Testability
- Linting (standard is nice)
- Unit Tests
- Enforced automated linting / tests when committing code
A strawman folder for an node project running within docker
- Folder
src/contains the node application. - Folder
docker/contains the docker build bits, with support for multiple environments in each sub folder - The launch script for dev is
docker/{env}/app/launch - The
./localcommand is a useful wrapper for docker-compose. It prints out what it is running, so you can adjust to suite your needs. You can get a full syntax by just running the command./local
Run the app container:
./local dev up
You can connect a shell to your running service with:
./local dev sh
./local dev sh -c "echo hello"
