Middleware for pervasive computing: A survey