The proliferation of various types of computational devices (many of which include the possibility of wireless network interconnection) allows a glimpse at a new field, which transcends the characteristics of most distributed systems in use today. This area, called ubiquitous (or pervasive) computing, presupposes a strong integration with the real world, keeping high transparency and focus on the user. To develop ubiquitous applications, we need a software infrastructure that can deal with different heterogeneities (hardware, operating systems, networks, protocols, and applications) as well as with whatever new challenges and issues might arise. This article proposes a general model for software architecture designed to support ubiquitous computing. It describes the fundamental issues of heterogeneity, scalability, dependability and security, privacy and trust, spontaneous interoperation, mobility, context awareness, context management, transparent user interaction, and invisibility.