implemented REST according to the proposal
integrated REST with distr/repl ensemble