bkhidhir / clean up analyticsapp_server code to provide single function for persistent storage