Some pseudocode for bitcask like storage