Currently, global is used to handle dependencies on application state (ongoing sessions), persistence (log storage) and external services (push target).
It has served us well but it's time to take a more robust approach. All global components are mutable (var) by global's nature. It would be less error-prone to instead inject dependencies into the handlers and phase out of using global altogether. The highest priority items are things mutated often: ongoing sessions and most recent completed session.
Currently,
global
is used to handle dependencies on application state (ongoing sessions), persistence (log storage) and external services (push target).It has served us well but it's time to take a more robust approach. All global components are mutable (
var
) by global's nature. It would be less error-prone to instead inject dependencies into the handlers and phase out of usingglobal
altogether. The highest priority items are things mutated often: ongoing sessions and most recent completed session.