Context-aware middleware encompasses uniform ions and reliable services for common operations, supports for most of the tasks involved in dealing with context, and thus simplifying the development of contextaware applications. In this paper1 , we address some key issues of a middleware for context-aware ubiquitous computing, ranging from design considerations of a unified sensing framework, formal modeling and representation of the real world, pluggable reasoning engines for high-level contexts, and context deliveryruntime service composition mechanisms. Our implementation experience indicates that a comprehensive approach throughout the system layers results in a flexible and reusable middleware architecture.