A redis backed O2 concentrator bank/stockpile management system. I has been implemented in Node.js with react frontend based on redis entirely(rdb+aof). We used redis gears function to allocate available concentrators to waitlisted orders as they arrive. This is in a way a workflow management happening through Gears.
The demo video has a short rundown of what the app is intended to do.
We accept donations from public and use it to acquire O2 concentrators. People can request concentrators on the app. We maintain inventory of devices with us indexed by location and model. This way the delivery time and cost as saved.
We implemented CRUD for donations, models(concentrator models as in make, specs etc), devices and orders.
Copy the redis.conf from conf folder and use it for docker.
docker run -p 6379:6379 -v redis-data:/data -v redis-config:/usr/local/etc/redis --name redismod redislabs/redismod --include /usr/local/etc/redis/redis.conf
docker start redismod
docker stop redismod
Getting into the container
docker exec -it redismod bash
Running redis-cli
docker exec -it redismod redis-cli
- Run
npm install
andnpm start
in this folder(where README is). - Go to the costock-react folder in a different terminal. Run
npm install
andnpm start
and that folder as well.
We auto-assign available devices to waitlisted orders through redisgears function(gears-scripts/demand-watcher.py
). We tested the execution and registration of the function using RedisInsight which makes it easily to copy paste the script content and create execution.
- Using timeseries to store device stats like oxygen levels and use it to replace devices or maintain them on their losing efficacy.
- Implementing a supply watcher script in gears to allocate devices on device addition when waitlisted orders are already present.
- Using RedisSearch instead of geopos/hset based indexes for devices.
- Request body validation
- URL encoding
- Login and user management
- write unknown error handler. don't leak server error messages in response.
- check ramifications of javascript int time treatment
- redis command return value handling
- flatten models hashset
- flatten donations into hashset