# Composing as a Service: A Real-World IoT Implementation
## 1 Introduction  
It can be estimated that one person produces an average of 300 g of waste in a daily basis. Therefore, an average of 100 kg of waste, is produced over a year (365 days) by that one person. In this notion, a residential complex with 100 residents can produce up to 10 tons of organic waste within a year. This kind of waste, although organic, is treated as regular garbage, disposed in municipal garbage dumpsters, until garbage collectors collect them and transfer them to the designated municipal garbage-disposal areas. As cities and their population become larger, residential areas become denser, thus producing larger volumes of waste, big part of which is organic. The disposal of such kind of waste in dumpsters poses several health risks for the community and its residents as it attracts insects and rodents that are potential disease carriers. To alleviate this issue, municipalities have resorted to composting, as it introduces a viable and profitable solution for the management of organic waste. In more detail, several cities have raised citizen awareness on separating regular household garbage from organic waste and initiatedorganic-waste-specific protocols for its collection and composting. Composting creates a unique opportunity for cities and citizens, as it transforms useless organic matter into odorless, nutrient-rich manure that can be beneficial to both parties. Cities can commercially exploit the created compost, and citizens can be reimbursed in municipal taxes refunds according to their waste contribution [1; 2; 3]. Nevertheless, cities are obligated to perform the composting procedure in designated safe zones, away from residential areas. Additionally, composing is a rather delicate procedure that requires constant supervision by experts to produce high-quality compost in a timely manner, thus requiring the employment of specialized personnel. Automated composting machinery has emerged to minimize human intervention as much as possible, but overall fails to deliver high-quality outcomes like supervised composting. To tackle human absence and provide continuous supervision and effective manipulation of the compost material, ubiquitous, high-end computation systems are required that can perform real-time analysis of sensor data concerning the compost material and its surrounding environment, and export relevant conclusions concerning the necessary actions to be taken to facilitate an optimal composting procedure. This poses a great financial limitation on such systems and creates a need for onsite administrative management (IT) and regular maintenance of those complex infrastructures. On the other hand, cloud computing [4; 5; 6; 7], along with the proliferation of Internet of Things (IoT) systems, frameworks, and architectures [8; 9; 10], has recently played a significant role in the development of intuitive and unsupervised systems and services. Taking into account all the issues mentioned above, this work, which is an evolution of our previous work presented in References [11; 12], introduces COMPosting as a Service (COMPaaS), a combination of an innovative IoT composting appliance and a cloud service that performs all necessary calculations and actions to provide a completely unsupervised, uninterrupted composting procedure. Our approach produces compost up to 30% faster than traditional composting methods, that is, in two months instead of three. In this work, our main focus has been on the layered IT approach that has been adopted following the edge-computing paradigm and not on the biological aspects involved. To the best of our knowledge, there is not other such tiered approach in bibliography for automating composting procedures. In more detail, we present a composting frame enriched with several sensors to measure humidity, temperature, and sunlight intensity, in and out of the frame, and the core of the compost material. Additionally, an IoT gateway aggregates all sensor data and controls all the actuators (fans, motors, etc.).