Intelligent management of application resources