# Replicating File Segments between Multi-Cloud Nodes in a Smart City: A Machine Learning Approach
## 1 Introduction  
There is no a unique agreed-upon definition for a smart city [1]. As for any big concept, definitions are set based on the objective of using the concept of smart cities. Due to the complexity of smart city concepts, many definitions are being used among the research community. While researchers adopt different definitions for smart city for different objectives, they all agree on the components that form a smart city [2]. Some of these components are cloud computing, edge computing, communication infrastructure, and data access [3]. Cloud computing is an approach that ensures resource sharing among users with minimal management. Resources could be networks, servers, storage, applications,services or data [4]. Cloud resource management is a research field that has been studied for the last two decades and most of its problems are being solved. Two problems are still hot topics: edge computing [5] and multi-cloud computing [6]. Edge computing is the field that is concerned with policies and techniques to migrate some of the computations and decision making from cloud to edge servers in order to minimise communication cost and to reduce some of the load that is handled by cloud servers so that cloud servers are left with tasks that cannot be performed on edge servers. Since the majority of edge servers are limited in resources, edge computing is still striving for contributions to solve many of its problems [5]. Multi-cloud computing is the approach of having multi-clouds cooperating together as a cooperative distributed system to solve problems that cannot be solved in a single cloud which are defined in [6; 7]. Scientific applications typically involve high-throughput experiments, such as satellite surveys [8], supercomputer simulations [9; 10] and sensor networks [11], which generate petabytes of scientific data, in addition to the massive data generated by internet every second. For example, the production of data within a radiology department in a hospital in an industrialised country such as the United States or Western Europe is on the order of 10 terabytes a year [12]. In European countries, the total data produced are in the order of petabytes per year and the total medical data of Europe or the United States can be estimated at thousands of petabytes. Furthermore, at present the largest astronomy database is around 20 terabytes per night. Nowadays, data generation is estimated 44 times more than that in 2009 [13]. At present the healthcare data worldwide are in terabytes (10\({}^{12}\) bytes), and it is expected in the future to be increased to zetaabyte (10\({}^{21}\) bytes) or yottabyte (10\({}^{24}\) bytes) [14]. Storing, accessing and analysing such huge data sets requires a means of efficiently organising, handling and manipulating high-volume data. Systems to address these fundamental issues are a focus of current research. As mentioned earlier, cloud, edge servers and IoT systems must have the capability to deal with the huge number of resources and users at the same time. Increased size sometimes presents the issue of performance degradation [15]. Therefore, such systems should be able to support adaptability, scalability and extensibility to avoid such degradation. The proposed partial replication algorithm allows users to replicate parts of files instead of replicating the full file. Hence, when a user submits a task that requires one or more files or segment of a file to be executed, the replica service uses the new portioning algorithm to divide a file into segments and transfer and save the segment(s) required by the task to the user's resources. The new replication system is treated as an optimisation solution that minimises the sum of the data access costs and achieves good system utilisation. This paper defines a multi-cloud edge hybrid system where resources are being shared and nodes cooperate together to ensure the availability of data with a minimum overall cost as will be seen later in this paper.