adding persistance for mariadb in localstorage and a mongodb 'in-memory'