## 7 Discussion  
Cloud computing has been considered one of the major computing paradigms in the field of information technology. This technological strategy offers consumers a smooth communication connection to a system of huge, virtualized computing resources that can be easily reconfigured for the scalable demands of users. Users can store their data in the cloud and access/retrieve these data when they require it [172]. Using cloud computing, costs of servicing and resource management involved with utilization have been deducted [173]. The cloud providers are responsible for maintaining and managing information over the cloud storage. Despite all the advantages that cloud computing brings for its users, several concerns have been raised: high latency for some time-sensitive applications, as well as security and privacy of the data being transferred to the cloud, to name a few. These are especially problematic in our scenario of automatic ticketing, in which a substantial amount of sensitive real-time information is being collected from the traveler's smartphone. In addition, these data should be analyzed with the least latency to define the location of travelers as well as the mode of public transportation.  
To combat the mentioned problems of cloud computing, EC solutions have been proposed. In EC, computations will be performed on the edge of the network close to the smartphones of passengers in our scenario. Placing computation power close to the edge reduces latency occurring during the data transition to/from the cloud and increasesthe speed of the transaction. Analyzing the data locally in EC protects the information of users from security and privacy vulnerabilities related to the network or the closed system of a service provider and, as a result, reduces the concerns related to sensitive data of a traveler's smartphone. The flow of data into central systems can be optimized, and the volume of raw data can be retained at the edge; therefore, bandwidth and related costs will be reduced. This is beneficial for automatic ticketing services and can help public transportation companies to offer lower prices for their services. The data have been stored and processed locally by edge devices and centers; this can overcome any intermittent connectivity issues.  
The first EC solution (mentioned in the previous section) of processing and analyses of all the sensor data at the extreme edge (the smartphones of passengers themselves) would not be possible practically because smartphones have limited computation power, limited memory size, and limited battery life. Thus, we considered uploading the raw data from the passenger's smartphone to other powerful IoT devices such as Raspberry Pi. The second solution, to a great extent, would reduce latency, operational costs, and security and privacy concerns related to cloud-based solutions, as well as intermittent connectivity issues. However, the limited computational power and storage of Raspberry Pi compared with cloud computing servers can be an issue, especially if we have a huge, increased amount of data to process; in this case, Raspberry Pi can communicate with the cloud-based environment to access more computational and storage resources that would cause the same problems of cloud-based computing solutions. Transferring the data to cellular base stations equipped with edge servers that have more powerful storage and computation resources, as well as a more secure environment, would be the best proposed solution. The edge layer can send the data to the cloud to support applications such as comprehensive enterprise management, product/process design, and further services, and gives feedback models and microservices to the edge layer. Moreover, the data can be shared through cloud collaboration among managers, cooperative enterprises, designers, or passengers to achieve more pluralistic and deeper data value mining.