Αποστολή με SMS: Online Algorithms for Optimal Energy Distribution in Microgrids