Engineering and implementing software architectural patterns based on feedback loops