Distributed In-network Processing and Resource Optimization over Mobile-Health Systems