A scalable middleware for context-aware mobile applications