# A Distributed Architecture for Smart Recycling Using Machine Learning
## 3 Motivation for Cloud Offloading  
When designing a system architecture, the designers of the system have to make some decisions in order to satisfy the requirements of the project while minimizing the cost and the engineering complexity. In this paper we have presented a distributed cloud based waste management classification system. The design choice of our system to utilize computational offloading to the cloud, in order to achieve a lower overall energy and lower cost of fixed assets was achieved after we had performed a scrutiny of energy and financial sustainability analysis, as its advantages outweigh its disadvantages. As technology has been evolving in the recent years, there is an increased production of data, mainly because of IoT devices, such as mobile phones, smart sensors and embedded systems. New applications such as augmented reality, artificial intelligence and machine learning are emerging and attracting users. These types of applications, however, are usually data or compute intensive and require high resources and increased energy consumption. IoT devices are known for the resource scarcity, having limited computing power and battery life. The tension between compute/data intensive application and resource constrained devices hinders the successful adaption of emerging paradigms. Such a paradigm is the computational offloading to the cloud, which has been very popular in the recent years. Computational offloading to the cloud expands the capabilities of devices with limited resources by performing data and computational intensive calculations on the cloud. Computational offloading has some distinct disadvantages, such as the increased engineering complexity, the requirement of an always on internet connection and of course the cost of the cloud servers. However, in some situations like the system architecture proposed in this paper, the benefits of computational offloading to the cloud outweigh its disadvantages. The most important advantage of using the cloud is the low overall cost the system and the low cost of fixed assets. The Raspberry Pi 3B+ based embedded devices in waste collection facilities cost only a fraction of the hardware that would otherwise be required, for example an Intel(R) Xeon(R) CPU E5-2630 v4 @2.20 GHz along with 2x Tesla K40m GPU. Besides hardware, software licensing is also a cost that needs to be taken into account for every site. For example, the Red Hat Enterprise Linux Server that we used for our experimentsis a proprietary operating system that is licensed per device. It is evident that at larger scales where waste classification is performed in many waste collection facilities, sending data to the cloud server for classification is much more efficient and keeps minimized the cost. Another advantage of utilizing the cloud is the ease of reconfiguring the classification algorithm. Because all the computations are being offloaded to the cloud, changes to the classification algorithm only have to be made once and not for each waste collection facility separately. Because of all the aforementioned advantages of computational offloading to the cloud, the design choice to implement it in the proposed system architecture was clear. In order to further increase the execution speed and efficiency of the proposed system, a possible solution is to implement the classification algorithm on an FPGA board, such as the Zynq-7000 ARM/FPGA SoC. The popularity of FPGA boards has been steadily increasing over the last decades. FPGA offers significant advantages over software running on a CPU or GPU, including execution speed and energy efficiency. In the proposed system, the FPGA board could be located in the cloud along with a high performance traditional server. As the server would receive images for classification from the embedded systems located in waste collection facilities, the server could offload the classification process to the FPGA boards. Many boards support PCIe connectivity, with a maximum theoretical bandwidth of 15.75 GB/s in version 3.0.