A novel routing algorithm for mobile pervasive computing