Mizu: The RESTful Drink Server
Mizu is the only debatably-modern Drink Server written in Python using Flask, ideal for consumption by CSHers
Mizu (水) is the Japanese Kanji meaning water. Water is clean and clear, and so too have we strived for clarity in this implementation of the drink server. Out with websockets and the Sunday protocol, in with a simple and clean implementation for the core of a project that has been a defining feature of the Computer Science House at RIT in various forms for more than two decades.
Documentation
Developer documentation is hosted on Postman and can be found here. Please keep in mind that this project is in development and the documentation may drift in and out of date. We will make an effort to keep it consistent with the current functionality of the server.
Related Projects
- Potion Seller - A lightweight RESTful application for controlling the CSH Drink Machines
- Tonic - A modern web application to allow users to drop drinks from the CSH Drink Machines
Why it exists
I know you're all disappointed that yet another house service has been written in Python using Flask. I will be the first to say that I'm sorry for this. However, It's become apparent to me in my years of being a drink admin that there needed to be an infrastructure in drink that took a stab at putting the project in a place where we could stop worrying about whether or not the server could be moved to a 64-bit machine (drinkjs64 lives on only in our memories, now), or whether it would work with the new user management infrastructure, or whether the webclient should expose the public api to sub-clients, etc.
There were many things that were aging and dying in the previous technology, and replacements have been grafted into the system time and time again. Drink rewrites have been achieved in the past, but hopefully this one sticks.
When it will be done
Any drink admin will tell you that this project is never complete. This implementation will be finished and in place when it outperforms the current implementation.
Developing
This project uses pipenv
to mange its dependencies. To set this project up for development, run
$ pipenv install --dev --skip-lock
Non-python dependencies
You will need to be on a machine that has the development headers for ldap (maybe also sasl), libpq/postgres, and ssl - if you are on MacOS, you may need to export the following environment variables to get the installation to work
$ export LDFLAGS="-L/usr/local/opt/openssl/lib"
$ export CPPFLAGS="-I/usr/local/opt/openssl/include"