Distributed context-aware systems