Communication library for distributed, heterogeneous and dynamic environments