daemon-rewrite: Implement in-memory aggregation