Software architecture for optimal use of heterogeneous mobile communication environments