# A Comprehensive Survey on the Societal Aspects of Smart Cities
## 3 Smart Cities' Technologies  
### Smart Cities Architectural Design  
As smart cities become more common and their implementation becomes a less ad hoc affair, it becomes necessary for a more planned implementation where the design and building of the smart city is coherently planned before implementation begins. In this section, we will discuss existing architectures for smart cities and their advantages and disadvantages. Therefore, considering all the dimensions presented above, there is a need for adequate smart cities' architectures. There are many types of possible architectures, but a three-layer architecture is a basic and generic architecture that supports several requirements of the implementation of smart cities, namely (i) the physical objects necessary for the functioning of the city (e.g., streetlights, traffic lights, or bus stops), (ii) the services provided by the smart city (e.g., lighting management, real-time location of buses, or management of irrigation), and (iii) the collection of data, analysis of data, and communication between the physical objects and the city services. As can be seen in Figure 3, at the bottom is the physical layer, which controls the various physical elements of a smart city, while at the top is the services layer, which provides access to all smart city services. Between them, a middle layer manages all collected data, analyzes them, and connects physical objects with their relevant services. While this architecture can serve for any implementation scenario, it also lacks the necessary level of detail and nuance required for the specific requirements that a city may need. Additionally, it does not address important considerations, such as security and privacy or system connectivity, which necessitate the use of more advanced architectures. More advanced architectures, therefore, must guarantee that these considerations are an integral part of the architecture. Security is one of the most important factors to consider, with data having to be properly secured both in storage and during communications, having to address all the myriad devices, the human element, privacy issues, and having a plan to guarantee continuous updating and future proofing. Furthermore, since cities are such big and valuable targets, special attention must be taken against cyber-attacks, and to secure physical infrastructure from attacks [175]. System connectivity is also of paramount importance to a smart city due to how its components require communicating with each other, so it is necessary to guarantee that all devices and systems have access to an adequate communication infrastructure to enable them to perform their work effectively and efficiently [176]. Citizens also require access to this infrastructure so that they may make use of the services provided [177]. Additionally, a common communication protocol must be defined by the architecture, or if such is not possible, it must provide for a middleware to allow seamless communication [178]. It must also consider how data are handled. Smart cities collect and make use of huge volumes of data; therefore, architecture must handle how that data are stored, collated, and analyzed, taking into special consideration what types of data formats to use and their interoperability [179]. Finally, smart cities' architectures must define options for if and how data are shared both within the system and with outside entities, or risk a fractured data ecosystem [180]. This is a subject where open data and open source policies are very significant [181]. One such architecture is the European Union-backed Internet of Things Architecture (IoT-A), which aims to create a reference model enabling true IoT applications. One of the problems for implementations that make use of IoT is that they are often conceived as a single solution to a single problem and thus do not consider communication with other systems. If it is necessary or beneficial to connect with another system, there is no guarantee that their communication protocols will be compatible.