AMISEC: Leveraging Redundancy and Adaptability to Secure AmI Applications