Software engineering based fault tolerance model for information system in plants shopping center

ABSTRACT


INTRODUCTION
Nowadays, the explosive growth of the development of mobile phone applications has made the issue of life easier. Some institutions such as museums, commercials enterprises or health have a large number of visitors and they may not have time to wait for the human guide to getting knowledge about the offered item [1,2]. Such a large number of visitors needs management and organize to the movement and requirement, in addition to that, each visitor may need information about offered objects in the shop. All of these requirements need to efficient and qualified guidance [3][4][5]. Thus, there is a need to develop a mobile application to works as an e-guide to introduce complete information to each visitor in the shop and at any time without waste time or cause disturbance to the visitor. These systems work to improve the performance and services introduced to the customer, in order to provide comfort to them during shopping. This lead to an increase in the number of visitors, so increasing the profit to the shop [6]. The integrated systems are designing for fault tolerance in general, so the system becomes able to deal with failure (fault) even if during execution to prevent stopping the system entirely. Mirror many of the fault tolerance systems are all its operations. This means that each operation must be executed on a duplicated system twice or more. The reason for that is in case of fault occur, the other parts of the system work as an alternative. The system is fault-tolerant if it is linked to dependable systems. In fault-tolerance systems, 6665 dependability covers part of the useful requirements. An example of these requirements are: reliability, safety, ease of maintenance and availability [7,8].
In this paper QR code technology is used to retrieve information about the offered item. All information is stored in the local server and backup at the main server. The main server works instead of the local server when a fault occurs in the local server, such as overload on the server which makes it is busy for a long time or may have another error. Fault is found using self-checking process based on software engineering technique. In this case, the work is converted to the main server in a transparent manner for the visitor to complete the system work without stop.

RELATED WORKS
This section details the related work about mobile applications that focused on information systems that use the QR code and the fault-tolerant systems. In [9,10], the authors introduced smart guide systems to the mobile visitor's phone, that can be used in several enterprises such as commercial, health and education institutions. These applications worked to retrieve full information about all offered items without calling the human to get help. The retrieve information was taken two formats: text and sound. These applications supported several languages which suitable for many nationalities. If this application was executed in shopping such as a mall, a virtual shopping cart is provided to help the visitor in movement inside the mall. Moreover, when the visitor decides to buy items, he can use a bank account to pay the cost. In [11], the authors introduced an indoor localization system, which was used to improve the visitor's experience at the museum. The proposed system depended on the Bluetooth low energy beacons proximity and localization capabilities to automatically provide the visitors with cultural content. In addition, the location of the visitor at the museum was estimated based on the RSS technology. This system was designed to be easy to extend to the Internet of Things technology and its effectiveness has been evaluated through experience. In [12], the authors introduced an android mobile application used by visitors of the museum to recognize the article which views information in an image, text, video or audio format via reading QR code that nearby the statue. This application was used to enhance the abilities of the visitors in the museum to access information by scan the QR tag from their smart mobile phone. It provided guidance tasks in the museum instead of a human guide. In [13], the authors proposed an android mobile application for object identification relies on scan QR code. This system was designed for identification many of items that exist by the easiest method. The proposed system consists of a database, web services used as intermediate to access the database and mobile application for the user to run it is on his/her mobile smartphone or tablet computers.
In [14,15], the authors introduced a survey on fault tolerance. Each system was able to interactive safely with unexpected failures or faults from hardware or software called fault tolerance. The faults must be assessed and handled in an effective way, for achieving dependability and robustness in cloud computing. The authors proposed an algorithm using artificial neural network (ANN) in order to detect the faults which overcome the algorithms' gaps and provide a model of fault tolerance. In [16], the authors introduced a survey about various fault-tolerance mechanisms in the distributed systems, that used to prevent multiple failures of the system and in different points of failure through high redundancy, considering replication and distributed services availability. In [17], the authors presented two techniques for providing a system of fault-tolerance. The first technique used redundancy in the infrastructure of the network. The second, adaptive technology is proposed. In the second technique, adaptive components such as H.264 codec and (H.265) were achieved to guarantee better performance.

PROPOSED SYSTEM STRUCTURE
The proposed QR based information system for plants shopping center with information management contains five important parts from as follow:  QR code tags: it is a two-dimensional form barcode, which can encode the large amount and different types of data [18]. Easiest way to access information that embedded on QR code Quickly by installed QR scanner application on smart mobile phones [19]. To generate QR code, we can visit one of the web sites that available online and download the code as a jpg image file and label on each offered item [20,21].  Mobile Application: to design a mobile application to this work, the Android Studio IDE (Integrated Development environment) 3.4.1 software is used [22]. This application is developed to the visitor's mobile phone in order to decode the QR code, send a request to the server, receiving information in image and text format from the server and display information on the mobile phone screen of the visitor. In addition to that, buying items by using a bank account and other uses.  Local Server (LA): in this work, the local server is provided with AppServ software to store the information of the entire system, where this server is installed to sub-station and then linked to  [23]. The records stored on this server can be accessed by the system administrator for several purposes such as updating the system data from adding, deleting or updating the item CRUD.  Main Server (MS): the main server is adopted with AppServ software. This server saves information of all stations that Affiliated to the same enterprise. It is employed as a cloud to store data for all stations, where works as a backup if the data in the local server has an error or to inform the visitor about what stations that provide the desired items through the search process.  Access Point: the TP-LINK router was used as an access point to connect clients' devices with the local or main server. In order to send the requests and receive the response to and from the server. The access point in this proposed system is very necessary to provide a large coverage area of Wi-Fi network. All of these elements the hardware and software linked with each other in order to works the proposed system in the correct manner. Figure 1 shows the structure of the proposed system, while Figure 2 represents the block diagram that explains the functions of the proposed system for the plants' shopping center.

PROPOSED FAULT TOLERANCE BASED ALGORTHIMS
To implement the proposed system, different algorithms were proposed to running the system correctly without stopping. These algorithms are explained in full detail as a follows:

Proposed management algorithm
The webpages are used to administrating all data of the proposed system by administrator of system. PHP programming language that includes in the AppServ package is utilized to develop these pages. Figure 3 illustrates the flowchart for administrating algorithm of the plant's system. The administrator (admin) of the system must have an account to login to the system. Otherwise, the main admin can add a new admin to the system. After the admin login to the system, he/she can make an update to the system's database, such as enter new items, show items, update items or delete items. In addition to that, the admin can show reports about the movement of visitors in the sub-station, and also can contact with an admin from another sub-station. When he needs to request additional items from outside the station, providing another station with new items that may be redundant at the station or any other matter, the admin can call other admin and manage any matter. Figure 4 illustrates how the fault tolerance works in the local server and main server. The Local server makes a self-checking to its working. If it works correctly, a copy of the updated data is sent to the main server for saving a backup from the updated data continuously. But, if the local server has some faults, the work is converted to the main server. When the local server returns to the work after a time period, the backup of data is sent from the main server to the local server to prevent conflict in data between two servers.

Proposed mobile application algorithm
When the visitor enters the plants' shopping center and needs to know information about the offered item, they must install the application of plants provided by the company to its customers. When the QR code scan by the visitor, the information is retrieved from the local server if it works without any fault. Otherwise, if the local server has a fault, the work is converted to the main server immediately to prevent the system from stopping. If the visitor decides to buy items and the local server working correctly, he must register in the local server and getting an account, in addition to record purchased items also in the local server, after that, the local server sends a copy of the recorded data to the main server as backup. But if the local server has a fault, also the work is converted to the main server and after the local server return to the work, and the backup is sent from the main server to the local to prevent the conflict in data between the servers and maintain consistency between them. Figure 5 illustrates the fault tolerance with for mobile application of visitor between the local and main server.

RESULTS AND DISCUSSION
For testing the proposed system, a simple prototype is adopted to present the idea behind this paper. The prototype contains different components from hardware and software. Hardware Components: one TP-LINK router as an access point, HP laptop a main server work as a cloud to all stations, Dell laptop works as a local server to sub-station and smartphone Galaxy S8 as the client's device. Software Components: AppServ package for programing that include (MySql, PHP and Apache), Android Studio platform 3.4.1 version with many of libraries so that the implementation in Gridle file for example (Volley:1.1.1, picasso.2.5.2, etc.) [24,25].
When the local server is working properly, a message appears on the admin's screen for inform that the local server is connected as shown in Figure 6. But if a malfunction or fault of the local server occurs suddenly, a message is appeared that the admin's screen to provide the system with information that the work is converted to the main server temporarily and the maintenance team was called to fix the problem as shown  Figure 7. When a problem occurred in the local server, the work is converting to the main server according to the proposed algorithms of the system. The applying of fault tolerance technique temprarly uses the main server for overcoming the detetced fault. When the connection to the local server is return correctly, the main server automatically sends a backup of the updated data to the local server to prevent the conflict between the data. Figure 8 views the message to the admin include the local server returns to the work correctly.
To test the failure case in the local server of the proposed system when the visitor uses the plant's application, the fault injection was used to test the proper fault tolerance working and how the work is converted from the local server to the main server. When the visitor scans a QR tag and not found an error in the local server, the visitor's mobile phone is linked to the local server and a message appears to the admin of the sub-station about local server status on the home page of the plants system as shown in Figure 9. In another case, if the local server has an error, the visitor's mobile phone linked to the main server automatically over the adopted Internet. A message is appeared at the system's home page to inform the admin of the sub-station about the fault in the local server as shown in Figure 10. After a period of time, if the local server returns to the work, the main server sends a backup of updated data to the local server.

CONCLUSION
A software engineering fault tolerance model for QR based information system for plants shopping center was proposed. Different algorithms were presented to cover the aim of the proposed system. These algorithms managed the software mobile applica tion and the information retrieving in addition to the network hardware management. In case of fault occurrence in the local server at a shop, the main server took the step of managing the local shop till the fault is fixed. The fault is detected using self-checking process as a part of software engineering techniques. When the fault is fixed, the local server took its order in managing the local shop and the updated information is copied from the main server. The proposed system was tested over different case studies and the results were proved the efficiency in terms of fault tolerance applying.