A Traffic Congestion Framework for Smart Riyadh City based on IoT Services

Internet of Things has become one of the most challenging issues in many researches to connect physical things through the internet by creating a virtual identity for everything. Traffic congestion in Riyadh city is chosen due to the proliferation in the number of vehicles on Riyadh roads that is resulting in grumbling by residents. Currently, there are few reliable services offered to residents from the traffic department enabling them to access traffic information. A new traffic congestion framework for Riyadh is proposed to help the development of traffic congestion services. This framework aims to benefit from the current Riyadh road infrastructure and apply the Internet of Things paradigm for detecting traffic congestion with Everything as a Service approach. Sensing devices are used to identify the congestion of the traffic flow through providing multiple proposed services such as a vehicle counting, live streaming video and rerouting services. Users are able to access the services by using proposed mobile application connected to the internet, as those services are integrated with public map service. By using the services, the users are able to identify the exact location where congestion occurs and an alternate solution can be provided easily. To achieve this, Business Process Execution Language is embedded as a supporting framework layer. Due to the effectiveness in this layer, executable workflows are designed to combine the proposed services with the legacy Riyadh services as individual model. This approach clearly defines how the services are executed through the proposed models. A quantitative evaluation is provided to support the usability of this research. Keywords—Traffic congestion framework; internet of things; smart city; business process execution language; everything as a service


I. INTRODUCTION
Nowadays, the rapid increase in traffic vehicles appears to be a major problem in urban and sub-urban regions.Traffic congestion in Riyadh city is an ever growing problem as the number of vehicles is growing exponentially and the road infrastructure cannot be increased proportionally.Moreover, with the fast development of Riyadh city, the scale of the problem is expanding day by day as the population of the city is also surging.According to a survey prepared by the High Commission for the Development of Riyadh city, the population of Riyadh is approximately 4.9 million that is flooding the roads with about 985,000 cars daily and an average of 1.6 cars per family which 90% of them are private cars [1].It leads to an increase in congestion of the roads which is rapidly becoming a phenomenon that is seen every day.Traffic congestion is one of the main reasons for increasing transportation costs due to the extra fuel and wasted time.Studies in Riyadh have proved that the costs of congestion create a heavy loss of SR 28 billion [2].
The growing number of vehicles and increased population have triggered to the requirement of effective traffic management systems.An Intelligent Transportation System (ITS) is an effective approach to solve traffic problems without building any extra physical infrastructure such as tunnels and bridges [3].It applies Information and Communication Technologies (ICT) to the online transportation systems to improve performance and help to alleviate traffic congestion and optimize fuel consumption [4].The global ITS market is expected to grow and reach 38.68 USD billion by 2020 [5].
Most researchers are engaged in exploring different technologies to monitor road traffic and detect traffic congestion to make congestion management more efficient.There are several technologies that are being used to detect traffic congestion, including loop-coils and intelligent video cameras known as CCTV systems.As stated in the Ministry of Transportation's report in Saudi Arabia [6], Riyadh City has some ITS systems which disseminate traffic information via the internet to a control center.Therefore, it offers pre-trip traffic information and on-trip traffic information services to their residents through radio and Dynamic Messages Signs (DMS).Traffic information is gathered from a variety of sources such as CCTV cameras, policeman maintenance, contractors and road travelers.However, CCTV cameras have lots of drawbacks such as being affected by weather conditions and high cost of installation [7], [8].Therefore, Riyadh city must benefit from the internet and communication technologies, especially concerning traffic, to be a smart city in traffic areas and provide residents more confidence and reliable services.
Recent fast advancements in various technological fields including hardware miniaturization, wireless communications, sensing devices and embedded computing allow for increasing physical world with a unique identification; and also the capabilities to analyze and process information to sense and respond to the environment, thus making them smart.By connecting smart objects to the internet, an Internet of Things (IoT) is formed.The IoT is such a key in ICT that is rapidly becoming one of the most influential development and research topics, through enabling people and devices to communicate with each other in real time.The IoT describes everyday physical objects connected with the internet and able to identify themselves to other devices.It provides more advanced services to people through connecting several devices, systems and applications beyond traditional machine-to-machine.
The concept of IoT is closely related to Radio Frequency Identification (RFID) as the way of communication and also it may include other wireless or sensor technologies.RFID is shaping up to be an important building block for the IoT.The affordable cost with improved benefits has made RFID a reliable technology with a competitive advantage [3].RFID is highlighted as one of the converging technologies and main catalyst playing a significant role in this project.Another reason is that RFID technology is considered as the most applicable for the country, such as in Saudi Arabia, where privacy is a big concern.The crowdsensing from user's smartphone [9] is getting more popular these days, however, it is argued that RFID is better in term of privacy as well as its support to the convergence of IoT [10].This research proposes an intelligent traffic congestion framework for smart Riyadh city based on using the same infrastructure and the IoT services through identification of vehicles causing congestion in specific regions.The physical basis of the framework is IoT, and realized computation and storage of services through a cloud computing platform.The objective of this project is to offer residents access to road information and detecting traffic congestion by providing them automated services such as counting vehicle service, video streaming service, dynamic message signs service and alternative routes in real-time.Business Process Execution Language approach (BPEL) is proposed to integrate more than one service in one model publicly available for residents.BPEL is a XML-based language used to define business processes' workflow to unify the format of business process flow definition.By using BPEL technology, the proposed services are integrated with the existing Riyadh services such as public map and CCTV services to offer the users a new service which is a traffic congestion service.

II. RELATED WORKS
A particular IoT service is useful to make application development and implementation in agile manner.Authors in [11] categorize IoT services into four categories, which are identity-based services, data collection services, collaboration-supported services, and ubiquitous-oriented services.Generally, IoT development starts from data collection to collaboration-supported and ubiquitous-oriented.However, not all services of IoT necessarily develop to the stage of ubiquitous convergence because some applications and services only require data collection and are not intended for ubiquitousoriented due to privacy required by minority group of people.
Riyadh city is the pioneer of smart city in Saudi Arabia since 2008, when Riyadh Municipality began to implement a smart street on Prince Muhammad Ibn Abdul-Aziz road by providing a free wireless internet service for all residents on this road through WiFi and WiMAX technologies [12].In 2013, Riyadh city is continuing its efforts by launching smart roads that are developed to combine extensions of Oruba and Abu Bakr Al-Siddiq Street, and are centrally operated by a control room.It aims to guarantee the premium safety standards for residents by offering dynamic message signs, ventilation fans, and 58 centers for emergency calling, with surveillance cameras along the tunnels, bells and alarms and escape doors between the tunnels with lighting [13].
Authors in [14] develop a traffic information interface based on historic traffic data.It aims to show the drivers an output in public map as image processing of traffic speed details of speed limit on the available routes with different colors by giving day and time limit information to help drivers make their choice in selecting a route or change their current route for any kind of incident such as traffic congestion.The traffic speed data are collected on the basis of video analysis from several segment routes.Several videos are collected from each road segment, then each recorded video is analyzed to measure the speed data.By using the data, an interface is developed to show the traffic conditions on public map with speed limits denoted in different colors, which can be a guideline for developing countries where navigation is still unavailable.On the other hand, this method has many limitations.The main problem is that collecting many videos is difficult and time consuming.Moreover, it does not provide a real time traffic information, only historical data are available.
Authors in [15] propose a vehicle cloud computing architecture based on three IoT layers: device layer, communication layer and service layer.By using a cloud computing technique, three layers enable devices, network and services to exchange information with each other in a real-time manner.Combining devices with cloud computing technologies allows essential services to be offered to residents.
It is observed that almost all the previous researches and studies that talked about IoT frameworks focus only on three or more essential layers, but each researcher names the layer differently.To date, the integration layer that can be used for integrating the services of IoT is not available yet.Therefore, BPEL tool is used to effectively collaborate and integrate several existing and new services with each other by defining a business workflow for each service in one BPEL model.Moreover, by using the BPEL tool the technical team can then easily develop several applications due to the visibility of any possible workflows amongst available service.

III. TRAFFIC CONGESTION FRAMEWORK
Riyadh city should benefit from internet and communication technologies to provide smart roads in order to have more confidence and reliable services.The ability to know the traffic conditions on the road ahead via effective services on the mobile devices allows residents to find out the number of vehicles on a specific road, display live video streams captured from CCTV cameras, view warning messages on DMS and find alternative routes.This eventually leads to the reduce of time consuming and vehicle's fuel consumption.Moreover, the DMS boards on the roads display warning messages automatically to residents.The more residents utilize these services, the more traffic congestion decreases and the more residents are confident and satisfied.
The proposed traffic congestion framework contains a fixed and mobile platform including the support of sensors mounted on vehicles.The sensor devices collects data and transfers it to cloud via the internet to offer new services to residents.More specifically, Fig. 1 shows the layers of the proposed traffic congestion framework for Riyadh city.This proposed framework consists of four different layers that have different purposes: a physical layer, a communication layer, an integration layer and an application layer.An architectural view of the framework is shown in Fig. 2. The bottom layer is called the physical layer, whose function is recognizing and collecting data of vehicles through RFID technology and CCTV cameras systems.When data are pooled synchronously, transmission is required on second layer, which is called a communication layer.The formation of network in the communication layer consist of wireless technologies such as 3G, 4G, LTE or WiFi.This layer is responsible for transmitting data with high reliability and security to cloud storage.The third layer is an integration layer.BPEL is used in this layer to design the workflow process of each service on the traffic congestion framework.BPEL is proposed to integrate several services with each other to build composite service; when more than one service is combined together in one BPEL model, then residents have a new service.The top of the framework is an application layer which consists of different services to be presented to residents, which are vehicle counting service, live video streaming service, dynamic messages signs service and alternative rerouting service.To achieve an effective traffic congestion control system in Riyadh, both RIFD technology and CCTV devices are used.RFID technology provides automatic recognition of vehicles with the tags, RFID tags transfer the signal containing the tag number captured by RFID reader.For this approach, vehicles should be installed with RFID tags; whenever the vehicle reaches the specified range of RFID readers, the RFID reader is able to read the information of each vehicle's tag.The stored information in the RFID tag for each vehicle can only be a unique tag number while the location coordinates and timestamp is in the RFID reader.The location coordinates should be integrated into the RFID reader through the built-in GPS sensor to provide information regarding where a vehicle tag has been interrogated and at what time.The microcontroller in the RFID reader is programmed to calculate the exact time at which the tag ceases to be read and then link the time with the location coordinate of the RFID reader.On the other hand, the CCTV video surveillance cameras that are installed on Riyadh roads is able to take images or recordings for surveillance to monitor the traffic congestion through the monitoring screen in the traffic department center.This research uses the already installed CCTV cameras through Everything as a Service (XaaS) technology to get the live video of each road to also be displayed to residents.
The information trunk for the IoT is a communication layer.The communication layer provides the connection between the physical devices of RFID readers and CCTV and the cloud through the internet.The layer makes use of 3G, 4G, LTE, fiber optic or WiFi networks to transfer the RFID data and video data to the cloud storage in application layer.These communication technologies generally characterized by high reliability and high transfer rates.
In integration layer, BPEL tool is used to display a workflow for integrating more than one service with each other.Because more than one service is combined with another service in one BPEL model, the users have a new service at the end of the model.Each service should be able to achieve automation of process by defining a workflow of activities which is called a business process.A business process is defined as a set of all possible sequences of activities for delivering a specific business objective, and business process of services is often modeled and performed through BPEL.The BPEL model is a language used to define how the business processes involving web services are combined and executed in smooth manner.Each notation represents a specific activity in the process.Fig. 3 presents the notations legend used in Eclipse BPEL designer and executed with Active BPEL Engine for traffic congestion framework.The goals of using BPEL models in the framework are: • To define the business processes by using XML language.
• The BPEL layer clearly represents the flow of each service such as vehicle counting service, CCTV live streaming service, rerouting service and DMS service in a graphical representation.
• BPEL has multiple graphical notations to show how the business process works and allow their use to be blended as seamlessly as possible, such as combining multiple services to one, therefore residents can choose the desired services from cloud without having prior knowledge about the application development.
• BPEL is able to combine multiple services in one service such as combining RFID service with the internet service and public map service to get vehicle counting service.
• The developers can easily develop applications and services by using the BPEL model XML code to create database modeling from where non developer end users can benefit.
The application layer in the top of the framework provides several services to residents to complete data processing, data exchange, data calculation and data storage.The cloud storage in this layer stores RFID tags, RFID readers' data and video data.The cloud is considered as XaaS and used to provide services in the application layer, hence, residents can access the cloud to choose their required services from their mobile devices.There are four proposed services: vehicle counting service, CCTV live streaming service, dynamic messages signs service and alternative rerouting service.These services can be executed from a mobile application to benefit residents in detecting traffic congestion on Riyadh roads and then reducing the congestion costs as general.Moreover, the proposed DMS boards service in the roads that relied on IoT also benefits residents to get reliable and real-time warning messages.

A. Vehicle Counting Service
The objective of Vehicle Counting Service is to display the exact number of vehicles in a specified street for one lane.It also displays the average number of vehicles for a specific period of time to detect the exact traffic congestion.There are two ways to achieve this objective.One is to use the BPEL model to identify the workflow of this service.The other is to develop a proposed vehicle counting web-based application.
BPEL model is used to combine street sensor services RFID internet service and user defined map service to become one service which is vehicle counting service by defining a set of activities for the service.The RFID readers in the roads are supposed to receive RFID tag information from each vehicle equipped with the RFID tag.The received information from the RFID tags and reader is then transferred through the internet to the cloud storage.The stored information is the tag number of each vehicle, location coordinates and time-stamp.Based on this information, it is possible to identify the location of each vehicle and the time when it crossed the RFID readers in the roads.The application in cloud is able to retrieve this information from the cloud storage to calculate and identify how many vehicles per lane are congested in a specific RFID reader range installed on the roads and the average number of the traffic congestion for a specific period of time.Once the user connects to internet, the result of the congested vehicles in a specific RFID reader is received through the proposed mobile application and integrating with the public map service for displaying to residents the average and exact number of vehicles per specific time in the congested area on public map.
A web-based application is developed which is used by Riyadh residents to assess the actual number of vehicles at each RFID reader for one lane in addition to the average number of vehicles for a specific period of time to detect the traffic congestion.The heavily congested roads are almost the result of bottlenecks; these bottlenecks are frequently due to the junctions, accidents, reduced number of lane or reduced carriage way width.Based on the previous researches, it is noticed that most of researchers are stated several metrics to measure the traffic congestion such as average traffic speed [16], intensity and density [17].This research proposes vehicle counting web-based application to calculate and measure the congestion of roads based on three important measures: the number of vehicles within RFID tags read by one RFID reader, the exact number of vehicles at each RFID reader based on the number of lanes, and the average number of vehicles per lane during a certain period of time by each RFID reader.

B. Vehicle Counting Web-Based Application
The presented web-based application is developed by using Microsoft SQL server and ASP.net programming language, which is a server side web application development structure that was generated for the web creation to develop dynamic web pages with Hyper-Text Markup Language (HTML), JavaScript and Cascading Style Sheet (CSS) to design the user interface.The vehicle counting service application is simulated by using ASP.net in visual basic (VB.net) and Microsoft SQL server database.Hence, the data are stored in the database.Moreover, by using public map API, the vehicle counting web-based application data are connected with the public map.The API can be retrieved from the provider by using an API key and then integrate it with the web-based application.The application interface is shown in Fig. 4.There are three tables in the setting page.The information in the tables is stored in database as inputs.The first table is for adding Riyadh roads on the public map.A user can insert new road by filling the following information: Road ID, Road Name, Road Latitude, Road Longitude, Number of lanes in each road and Notes.The second table is for adding the RFID Readers in Riyadh Roads by filling the RFID Reader Name, Latitude and Longitude of this reader and the Road that want to add this RFID reader to it.Finally, the last table is for adding vehicles which represent by the vehicle tag ID for each one.The inputs are stored in the database, and then this information is retrieved back through ASP.net with the integration of public map API services to give the output to Riyadh residents.
In Fig. 5, the vehicle traffic page aims to insert vehicle tag to particular RFID reader.In other words, the RFID reader reads the tag information for each vehicle that passes along the road.Each vehicle tag is inserted to one of the defined RFID reader in setting page.Once the vehicle tag is added to particular RFID reader, the detailed table is shown in the vehicle traffic page.This table contains the information of RFID reader and roads.It displays the exact date and time when the RFID reader and vehicle tag are inserted.

C. CCTV Live Streaming Service
The current CCTV system in Riyadh city is used for the video surveillance of roads that is accessed only by the traffic department.A traffic department employee should see the status of the roads and then assign a traffic policeman to a specific site to manage the traffic congestion or any other services but this method is not of much use to the Riyadh residents.This research project improves the performance of the current CCTV monitoring system by allowing access a live streaming video service to residents.The BPEL model combines the CCTV service, the internet service and user defined map service (in this research, public map service is utilized) to provide residents map-based video live stream service.The BPEL model also displays the workflow process of the CCTV live streaming service.
The CCTV cameras that are installed along Riyadh roads are connected to the internet to store the received video data in the cloud storage, then the same video data are streamed from the cloud to residents by using an application to view the live streaming video of the desired road.Once video data are received, public map is invoked to display the CCTV locations on the roads.Then, residents choose the desired location that has CCTV cameras and finally residents are able to view and display the live streaming of the chosen road.

D. Dynamic Messages Signs (DMS) Service
Some roads in Riyadh city have DMS boards displaying warning messages regarding the traffic status to residents.It is the responsibility of the traffic department to update the messages based on CCTV system.Residents are unable to get real-time information because the DMS is not updated automatically.BPEL is able to combine street sensor services (RFID), internet services and public map service in one model.
IoT is proposed to connect the DMS to the internet and then the dynamic message board is able to provide real-time messages to residents who are travelling on the roads.The DMS is completely controlled by an application itself and the information is retrieved from cloud storage based on the RFID readers' information, not from updating the DMS application manually through the monitoring of the traffic department to CCTV cameras.The RFID readers installed on the roads are able to receive the installed RFID tags information from the vehicles.A DMS application in the cloud retrieves only the RFID readers' information that is placed after the DMS from the cloud storage to compare which RFID reader shows the most congestion and then an automated warning message is displayed on the DMS board on the roads to residents.Since the availability of the internet for DMS on roads and on users' mobile applications, residents are now able to see warning messages about any congestion via a DMS board on the road and also via public map on a mobile application, in addition to receiving any warning messages from the traffic department regarding to weather effects, accidents and others.

E. Alternative Rerouting Service
In alternative rerouting service, if there is traffic congestion on some roads, the service gives residents an alternative road based on the real-time information of the RFID data.BPEL combines the sensor street service, the internet service and public map service in one model to act as one service, which is a rerouting service.
The RFID readers read the RFID tag information from each vehicle equipped with the RFID tag.The received information is transferred through the internet to cloud storage.The alternative rerouting application in cloud compares the congested vehicle data of the nearest RFID readers to the congested road and then the application stores the least congested value of the road.Thus, users can open the application and connect to the internet service to receive the value of the least congested road.Public map is also required to be invoked, so that the application provides the users with the least congested road as a rerouted road for residents, visually available on the map.

F. Traffic Congestion Service
The traffic congestion service combines the vehicle counting service, CCTV live streaming service, dynamic messages signs service and rerouting service together in one BPEL model.These services are available to Riyadh residents from the mobile applications on a public map at any time and from anywhere in Riyadh by XaaS, in addition to the DMS boards that are installed on Riyadh roads that give real-time warning messages.These valuable services benefit residents by detecting real-time information on traffic congestion, thus saving valuable time, and warning residents about traffic congestion in a specific location, thus enabling resident to easily choose a recommended alternative route to avoid the traffic congestion.BPEL is used to combine the proposed and existing services in one model to act as one service.

IV. TRAFFIC CONGESTION SERVICE MODELS
The BPEL model shows a list of the activities of each service.Residents can benefit from choosing their desired services from the cloud; the application can be developed by the developers with reference to the BPEL models for the benefit of both the traffic department and residents of Riyadh.Although BPEL is a modelling language, the user can design their models by using an interactive any graphical BPEL designer tool and then execute the model by instantiating abstract services in the model with concrete available services.Hence, there is no programming task required to execute the BPEL models, especially if concrete services are already available.

A. Vehicle Counting Service BPEL Model
A vehicle counting service BPEL model is shown in Fig. 6.The model shows the list of activities that should be followed in each service to assess the number of vehicles congested in a specific road per every lane as well the average number of vehicles for a specific period of time.
The service starts with receiving a request, which then invokes the vehicle counting service to begin the processes.By assuming there is a flow of readers on the roads, and taking one RFID reader in the Northern Ring Road and another in the King Fahad Road, both RFID readers read the vehicle's information from the RFID tags that the vehicles on the roads are equipped with and assigned a RFID tag's information to each RFID reader; the RFID readers on the two roads then assign the information from the RFID readers as tag numbers, location coordinates and time-stamps to the cloud storage by invoking the internet service.The application in the cloud retrieves the RFID readers' information to calculate the number of tags for each RFID reader.Then, resident invokes the internet service to connect with the mobile application to receive the RFID reader's values from the cloud.Once the values are received, the public map API service is invoked to retrieve the maps from the cloud and then the retrieved RFID reader's values are assigned to the map.Finally, the total number of vehicles are indicated to residents on the public map for each reader.
The developed web-based application for vehicle counting was built to display on public map the actual number of vehicles per specific minutes in one hour and in one lane for each RFID reader.Overall, the application operated well and as intended.The Vehicle Counting Web-Based Application is able to provide the result from the inputs of RFID readers, Roads and the Vehicle tags.Hence, the inputs data are combined to give the output.Fig. 7 shows the number of vehicles per lane in addition to the average number of vehicles per specific time of period based on resident's preferences.The user preference is the key concept of XaaS as coined in [18].
From report page, resident can choose specific time in hour to display the average number of vehicles per lane either in five minutes or above.As each vehicle is mapped to RFID reader, the equations are executed to get the traffic congestion results.Once resident chooses show reports menu, the public map is displayed to resident.The location of RFID readers are marked in red icon.Then, the user can zoom in the map to choose the desired reader of specific road and click on it.The popup screen appears with the name of reader, road, road lanes, actual number of vehicles in any lanes, number of vehicles per one lane and the average number of vehicles per specific period of time.Through these information, resident can view the congested road for each RFID reader and detect the traffic congestion.

B. CCTV Live Streaming Service BPEL Model
A CCTV live streaming service BPEL model is shown in Fig. 8.This model shows a list of activities that should be followed to apply this service to achieve the goal of a live streaming service to residents.Hence, residents are able to see the live video status of the chosen roads in Riyadh roads.
The CCTV live streaming service is invoked to get the result of the CCTV video footage on public map.By assuming there are two CCTV cameras processed in parallel, one in Northern Ring Road and another one in King Fahad Road, both cameras take live videos of the roads and the video data are assigned to the CCTV in the same road.After the CCTV video data have been received, it is assigned to the cloud storage by invoking the internet service.The video data from the cloud storage are retrieved by invoking the internet service from resident to connect with the mobile application.Once the video data are received, the public map API service is invoked to retrieve the maps from the public cloud, then the video data and map data are combined together to show the location of the CCTV cameras installed on the roads of Riyadh.Accordingly, residents can choose the CCTV cameras of the needed location from public map.The desired location of CCTV is assigned to public map and finally, the mobile application is able to give a pop-up screen to show the live stream of the video data for the chosen road.The output of the CCTV live streaming service model is shown in Fig. 9.

C. Dynamic Messages Signs Service BPEL Model
A dynamic messages signs service BPEL model for the Dynamic Messages Signs (DMS) in roads and mobile application are shown in Fig. 10.The BPEL model shows a list of activities that should be followed to apply these services to achieve the goal of displaying real-time warning messages about the traffic congestion status on the roads.
The model starts with invoking the Dynamic Messages Signs Service.By assuming there are three parallel RFID readers after the DMS board in the Northern Ring Road, these readers read the tag information for each vehicle that passes along the northern ring road and assign each RFID tag information to the RFID reader.The three RFID readers then assign the RFID information to cloud after invoking the internet service.A DMS application in cloud is programmed to receive the information of the RFID readers that is installed after the DMS from the cloud storage and then identify the congestion of vehicles by comparing the results of each RFID reader's information.For example, Northern Ring Road RFID Readers (2) and ( 3) are placed after the DMS board.Northern Ring Road RFID Reader (2) has 30 vehicles and Northern Ring Road RFID Reader (3) has 100 vehicles.The highest number of vehicles in the two RFID readers are identified by the application and considered as more congested, which is Northern Ring Road RFID Reader (3).
The DMS board on the road and the mobile application www.ijacsa.thesai.orgmust connect to the internet to receive the Northern Ring Road RFID Reader (3) information as the highest congested reader from the cloud.An automated message is displayed on the DMS board on the roads after assigning the Northern Ring Road RFID reader (3) data to the DMS, while the warning message in the mobile application appears to the users after invoking the public map service and assigning the Northern Ring Road RFID reader (3) data to the map.Thus, Riyadh residents can get warning messages about congestion or any updated status regarding traffic problems from the roads and from the mobile application.Unlike the existing DMS in Riyadh, the DMS in the framework can also be accessed by any user's device, since XaaS technology is utilized.The output of the dynamic messages signs service on roads is shown in Fig. 11, while the output of the dynamic messages signs service in mobile application is in Fig. 12.

D. Alternative Rerouting Service BPEL Model
An alternative rerouting service BPEL model is shown in Fig. 13.This model shows a list of activities that should be followed to apply the service to achieve the goal of providing residents an alternative route that is not congested.
The alternative rerouting service is invoked to identify the least congested route.Assuming there are three RFID readers: in Northern Ring Road, King Fahad Road and King Abdullah Road.These readers read the tag information for each vehicle that passes them and then each RFID tag's information is assigned to the RFID reader.After that, the three RFID readers assign the RFID tag's information to cloud storage after invoking the internet service to store this information in cloud storage.The alternative rerouting application in the cloud receives the RFID reader's information, then the congestion comparison is taken to identify the lowest number of RFID tags, for example the RFID reader in Northern Ring road receives 300 RFID tags while the RFID reader in King Abdullah road receives 58 RFID tags.The lowest one, King Abdullah road, is chosen through this application and the rerouting path is identified as King Abdullah road.When resident invokes the internet service, then the mobile application receives King Abdullah road information from the cloud, then public map is invoked to retrieve the maps from public cloud and King Abdullah road information is assigned to the map.Hence, residents are notified by the mobile application to reroute to the least congested road to reach their needed location without any congestion.The output of the Alternative Rerouting service model is illustrated in Fig. 14.

E. Traffic Congestion Service BPEL Model
A Traffic Congestion Service BPEL model shows the list of activities that should be followed to combine the proposed services with each other in one BPEL model (it is not shown due to the limitation of the page).As the proposed services are in cloud as a service, residents can choose any service they need from public map in the proposed mobile application or from the DMS in the roads.The appropriate output of each service is given through the application layer.
The physical devices in traffic congestion service model comprises RFID and CCTV cameras.The RFID sensors services can be used to access the output of the received RFID tags, and is used by the following three services: Vehicle Counting, Dynamic Messages Signs and Alternative Rerouting services.The output of RFID services is stored in cloud storage.Similarly, the CCTV cameras that are installed on Riyadh roads are able to retrieve the video data of each road and then store it in cloud storage.Each application on the cloud is designed depending on each service and is able to retrieve the needed data from the cloud storage and then process it.
The returned values from the cloud are combined with the public map API to get the output of services in one application.Hence, residents are able to choose their desired services from the proposed mobile application.Furthermore, the returned RFID reader's values from the cloud are also used for the DMS on the roads.Residents have the option to use the mobile application or the DMS boards on Riyadh roads.
In Fig. 15, the traffic congestion service starts with receiving a request, and then invokes the traffic congestion service to initiate the processes to work.In this traffic congestion service model, there are two physical devices: RFID and CCTV devices.Both of them are accessed in parallel by using the flow activity.RFID services start by assuming there are two RFID readers, one in Northern Ring Road and the other in King Abdullah Road.The readers read the vehicle's  information from the RFID tags which the vehicles on the road are equipped with and then the flow of RFID information is assigned to the reader.Then, Northern Ring Road RFID reader and King Abdullah Road RFID reader assigns their information as tag numbers, location coordinates and timestamps to cloud storage by invoking the internet service.The second service is CCTV services, responsible for getting the live video of Riyadh roads.By assuming in one flow there are two CCTV cameras, one in Northern Ring Road and another in King Abdullah Road, both cameras take live videos of each road and then the video data are assigned to the CCTV camera in the same road.The flow of the CCTV video data is assigned to cloud storage by invoking the internet service.
The RFID and CCTV video data are stored in cloud storage.From the cloud, each application carries out its functionality to give an appropriate service.The proposed services are processed in parallel, therefore it is required to use the flow activity to explain the process of each service.
Firstly, the vehicle counting service as an application in cloud processes a list of activities in ordered sequence.The vehicle counting service receives the Northern Ring Road RFID information and King Abdullah Road RFID Reader information from the cloud storage to initiate the processing and calculating of the average number of RFID tags during specific period of time for each RFID reader and then assign the average number of vehicles for each RFID reader.Secondly, the CCTV live streaming application in cloud is composed from ordered activities, starting by receiving the video data and then assigning them to the CCTV application.Thirdly, the dynamic messages signs application aims to display some warning messages on the DMS boards.This application in cloud is programmed to receive only the RFID reader's information located after the DMS board from the cloud storage and then identify the congestion of vehicles by comparing the results of each RFID reader.
When there are two RFID readers in Northern Ring Road, the Northern Ring Road RFID reader (2) tagged 55 vehicles and the Northern Ring Road RFID reader (3) tagged 110 vehicles, the DMS application compares them and the highest RFID reader which is Northern Ring Road RFID reader (3) is assigned to the DMS application and considered as the more congested reader.Lastly, the alternative rerouting application in the cloud aims to enable Riyadh residents to take another path to avoid road congestion.This application starts with receiving the RFID readers' information from cloud storage.By assuming there are two RFID readers, one in Northern Ring Road and the other in King Abdullah Road.The application is programmed to compare them and take the lowest number of RFID tags in each RFID reader -for example, the RFID readers in Northern Ring road receive 300 RFID tags and the RFID readers in King Abdullah road receive 33 RFID tags.The lowest one which is in King Abdullah road has the data assigned to the alternative rerouting application.
The output from each application in the cloud is processed in a parallel way based on the requests from the users.When the users need to see the warning messages of DMS boards on the roads, the DMS board must invoke the internet service to be able to receive RFID readers' data from the DMS application.The DMS receives the Northern Ring road RFID reader's (3) information as the more congested area, therefore it assigns this information to the DMS board and then the application displays a warning message on the board to the users that there is congestion in this area.
Regarding the proposed mobile application in the users' devices, it has four proposed services that benefit Riyadh residents by identifying and detecting traffic congestion on Riyadh roads.If residents need to access the proposed mobile application, their application must invoke the internet service to be able to display the proposed services.Then, the mobile application receives the processed RFID and video information from the cloud.The application also invokes public map to retrieve the data and services from the public cloud and integrate them with the processed RFID and video data from the cloud.The services are processed in parallel to respond to residents' requests and the values of services are assigned to the map.Hence, the proposed services are shown on the map to enable Riyadh residents to choose and display one or more than one service at the same time, such as number of vehicles at each RFID reader, warning messages on the DMS boards, alternative rerouting.Additionally, residents can choose the CCTV cameras of the needed location to view a live stream of the road.Finally, residents' traffic congestion service request is replied to, since XaaS technology is utilized.

V. QUANTITATIVE EVALUATION
A quantitative experimental correlational study was designed to measure the impact of this research.The population of this study is Riyadh adult users of internet connected devices.To evaluate the usability of the research, a ten-item questionnaire was randomly devised and distributed to seventy participants, who willingly decided to take part in the survey.The participants were provided with a list of service output images.The participants were required to answer the following ten questions on a scale from 1 to 5 where 1 -Not at all, and 5 -To a large extent.Table I shows the results of the survey distributed amongst students and staff for a set of 70 surveyed actors.For example, Q2 has a mean score of 4.02 showing that; overall, participants rated the Fig. 9 as highest.Most of the participants gave a score about 4 to all questions with a low standard deviation meaning that there are only small differences between the participants' answers.This result can be used to roughly identify the central tendency and the outlier of the observed data.

VI. CONCLUSION
The traffic congestion framework of Riyadh city is presented to improve Smart Riyadh City.XaaS is considered as an appropriate approach used in the framework due to enhance the public services and increase transparency between traffic department and residents.XaaS approach advances the framework through BPEL models which are useful for www.ijacsa.thesai.orgbusiness managers and developers to provide a complete traffic congestion system for Riyadh city to offer their residents effective services.The proposed traffic congestion service are vehicle counting service, which is proposed to detect the total number of vehicles congested in a specific road; dynamic messages signs service which is completely automated, real time message service which is shown via the road's message boards and through mobile devices to residents; CCTV live streaming service which helps residents to know the exact status of traffic by displaying a real video of the roads; and lastly, rerouting service which is more convenient for residents to navigate to another route with less congestion.As services are in the cloud, residents can easily choose the desired services of their choice from the mobile application or from the DMS boards that installed on the roads.As BPEL supports the workflow process to combine atomic services, one BPEL model is designed to combine any IoT services.A quantitative evaluation was conducted to measure the usability impact of the research to residents.The future work includes a stronger comparison analysis between the proposed models by measuring quality of service metrics as key performance indicators and covering more roads in Riyadh.

Fig. 2 .
Fig. 2. Traffic congestion architecture for smart riyadh city based on IoT services.

Fig. 5 .
Fig. 5. Vehicle traffic page in vehicle counting web-based application.

TABLE I .
SUMMARY OF THE RESULTS OF THE CONDUCTED SURVEY Questions Mean Std Dev.Q1.After you use the Vehicle Counting Service, do you like the service output (