Building Smart Communities with Cyber-Physical Systems