basic interfaces and implementation for cqrs