Asynchronous nested optimization algorithms and their parallel implementation