refactor replication, not compatibility

use data and meta file for a table
use mmap for file read and write