CQRS stands for Command Query Responsibility Segregation. Greg Young has coined this term and most of the literature on the internet regarding CQRS would be associated with him.
In the simplest sense, consider the following scenario:
UserService.scala
trait UserService{
def createUser(user: User): Unit
def editUser(details: UserDetails): Unit
def deleteUser(user:User): Unit
def getUser(userId: Int): User
def getUserFromName(name: String): User
def getUserPreferences(userId:Int): UserPreference
}
We have a UserService that declares calls to create/get/update users. Applying CQRS would result in splitting UserService into two separate services:
trait UserReadService {
def getUser(userId: Int): User
def getUserFromName(name: String): User
def getUserPreferences(userId: Int): UserPreference
}
trait UserWriteService...