Efficient Distributed and Federated Learning