Situated computing is an actual research area that gathers the knowledge and investigation in mobile, wearable, ubiquitous and augmented computing. The aim is to sustain systems that collect information about contexts and user actions over a period of time and supply it to applications that dynamically adapt to context changes. Situated computing systems have various architectures, but most of them include a middleware layer that supports equipment with limited computing resources and offers functionalities that simplify applications development, deployment, execution, and maintenance. Middleware and architectures are the focus of this paper, which presents the main concepts, research results, and future trends in middleware for situated computing. Service oriented, event driven, agent-based, and peer-to-peer architectures are discussed. Middleware issues for situated computing, embedded devices, autonomic space management, proactive services, context awareness, and smart spaces are tackled as well.