Development of an Automated Passenger Transport Management System Using Microservices Architecture Mykyta Dermenzhi1, Svitlana Kuznichenko2, Tetiana Tereshchenko3, Iryna Buchynska4, Viktoriia Klepatska5 1, 2, 3, 4, 5 Odessa State Environmental University, 15 Lvivska Str, Odesa, 65016, Ukraine Abstract The paper presents applied aspects of the design and development of an automated passenger transportation management system for any transport company. A flexible architecture of the transport system (TS) is proposed, which is built according to the microservice methodology and simplifies the synchronization processes between drivers and operators. Vehicle information is updated via GPS. The proposed design approaches allow to customize the TS to the individual needs and initiatives of customers and quickly expand functionality and add new features and services. In addition, the system can be used as an intermediate node for embedding in an existing system to collect information and provide a graphical user interface for operators. Keywords 1 Transport system, automated system, GPS, microservices architecture. Introduction • Storage and management of information about vehicles and their technical Transport is one of the most important characteristics; branches of social production and it is designed to • Driver information management: current meet the needs of the population in transportation. position during the trip, contact details, the In Ukraine, most bus services are provided by vehicle to which they are assigned; small private enterprises. Their fleet of vehicles • Ability to expand locations on the map provides urban, long-distance and international and update them: location is a material point, transportation in Europe and the CIS. A feature of which is added by the operator to establish a the work of private operators is the difficulty of point of repair, parking, stopping, etc.; control and the lack of a single system for • Keeping records of reference data on monitoring vehicles on routes, which is often an emergency repair and synchronization of data obstacle to making operational decisions to from external resources; optimize the operation of transport. In this regard, • Creating routes using external APIs, there is a need to create an automated passenger using software to store information in internal traffic management system with the following repositories and caching this data for the capabilities: 2 fastest response from the server; • Systematize available information for planning future transportation; III International Scientific And Practical Conference “Information Security And Information Technologies”, September 13–19, 2021, Odesa, Ukraine EMAIL: nikita.dermenzhi@gmail.com (A. 1); skuznichenko@gmail.com (A. 2); tereshchenko.odessa@gmail.com (A. 3); buchiskayira@gmail.com (A. 4); victoria.klepatska@gmail.com (A. 5) ORCID: 0000-0003-3564-9806 (A.1); 0000-0001-7982-1298 (A. 2); 0000-0001-7691-6996 (A. 3); 0000-0002-0393-2781 (A. 4); 0000-0001-5613-6546 (A. 5); ©️ 2021 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0). CEUR Workshop Proceedings (CEUR-WS.org) • Automatic processing of the vehicle’s Presentation of the main research arrival to the final stop and the ability to adjust the time in case of trip delays. material In recent years, researchers have shown great interest in the public transport system. This is The main non-functional requirements (NFR) largely due to the growth of cities and transport for the project are: development of territories [1]. The principles of • completeness of information and creation and features of transport systems (TS) technical specifications; architecture are widely discussed, which can • availability of the service regardless of provide important programs and services to time; improve the safety and mobility of passenger • the ability to expand the content; traffic, as well as to optimize transport resources • dynamic cartography, independence from and time [2-4]. The article [5] discusses public the map provider; transport management systems for future smart • confidentiality of customer data; cities built using Internet of Things (IoT) systems. • security of obtaining data on TS is actively used in the architecture based on the synchronization of movements of system joint use of IoT and geographic information objects; systems (GIS), which have great potential to • service of operators and drivers in real support decision-making in various fields of time with minimal delays; human activity [6-8], including public transport. • design flexibility and ease of use by end Thus, in [9] a project of emergency management customers; system for public transport networks was • the ability to scale the system and the presented, which uses IoT technologies for traffic number of services during support; monitoring, as well as GIS to facilitate situational • the possibility of the system deployment awareness and emergency operations. This work process on different platforms; [10] explores how to develop an extremely • support for data integration using flexible and comprehensive architecture for TS resources and sources implemented by the that can use the latest technologies, such as cloud customer; computing and the subscribe-publish • possibility of constant logging and data communication model. recovery; However, despite the large number of • simplification of visualization on mobile publications related to the development of devices and tablets, to maintain the full transport management systems, it is important to consistency of data, as well as the use of the consider the applied aspects of the development platform by operators in cases of inability to of their infrastructure and implementation stages use a computer; of design solutions. In addition, one of the main problems • fast conversion of content with translation associated with TS are external and internal into other languages; integration processes, such as: the implementation • dynamic specifications (vertical of data dependencies and tracking their changes, expansion): CPU speed, memory, disk space, tracking cars using intermediate services, and so network performance. on. In addition, to determine the progress of the Thus, the main goal of this project is to develop project, functional sections were introduced, an automated passenger transportation which in turn build the system as a whole: Models, management system of the transport company Vehicles, Drivers, Contacts, Locations, Cities / with the ability to: systematize data obtained Regions / Countries, Routes, Schedules, Trips, during trips, receive instructions for creating and System Settings. installing new services, infrastructure preparation (ease and speed of deployment, integration of Prerequisites for the implementation customer data, etc.), the ability to use the system of the system on any platform and support for gadgets from phone to computer. With each passing day, the implementation or sequential integration of artificial intelligence (AI) according to [11] research is becoming an increasingly important process in information shipments, and instead wants to use systems. Such services can allow you to build systematization, storing important data on travel trips more accurately, help resolve conflicts, and and drivers for further analysis. Data analysis of more. This project is integrated with TomTom this type can provide an understanding of how systems, which provide AI API for building and employees perform their work and will allow calculating trips. Such routes are close to real, and them to track problems without direct contact with it becomes easier for drivers and operators to operators. coordinate actions. Most modern systems use the Global Implementation of constant vehicle Positioning System (GPS), which allows you to get the coordinates of vehicles and place marks on tracking a virtual map [12]. It should be noted that the developed system There are several basic approaches to also implements this approach and deepens it. obtaining information from external resources This is an optimization model, when information [13]: is provided in small portions, and the user while • Long Polling; navigating the virtual map loads updated or • WebSockets; changed data. This reduces the load on the server • Server-Sent Events. and facilitates display on the client application. All of them allow you to get up-to-date Additionally, the system provides the ability to information using external systems. automatically calculate and build routes, simplify WebSocket is a computer communication the workflow for operators and synchronize protocol that provides full-duplex communication statuses for system users. In addition, the system channels over a single TCP connection. It is can be used as an intermediate node to integrate synchronous, which gives a high level of into an existing system and used to gather correctness, but connecting a large number of information and provide a graphical interface for connections can lead to poor performance of the operators. This approach saves time on reporting module. and allows you to use the data recorded in the Server-sent events (SSEs) are a one-way system as automatically generated reports. This communication channel where events are increases the level of security and also reduces the transmitted only from the server to the client. risk of error on the part of the operator. All current Events sent by the server allow browser clients to data: vehicle location, rerouting, trip status receive the stream of events from the server over update, adding or deleting locations and system an HTTP connection without constant polling. users, are stored at the information store level. It was decided to use a combined approach to Note that most of the existing logistics systems connect the system to the constant updating of are tied only to the construction of vehicle vehicles via the GPS system: to create an tracking without the possibility of integration into intermediate module that will use web sockets, this process of other users of the system, such as and to receive synchronous information. operators, administrators, persons who provide As soon as the socket sends a new message parking and repair facilities, etc. This project from the vehicle tracker, this message is solves the main problem of transport companies: transmitted to the asynchronous queue. Thus, the combining all operators, drivers and intermediate queue will use the SSE approach, which sends users of the system in a single application and messages to all system subscribers (authenticated saving current data for sequential analysis. users) through other communication channels Project consumers can choose their own (Fig. 1). configuration and use integration processes to enter existing data (drivers, locations, automotive Architectural approaches during objects, routes, etc.) using an external integration service. This allows you to not disrupt the implementation technological processes of the business and make it easy to combine two or more projects in one The project is based on the principles of the ecosystem. structure of micro-services, as shown in Fig. 2. It is assumed that the consumer is a self- The first service is a graphical user interface employed person or a commercial group who is (GUI) layer what is a web application. The next interested in saving time and money on late mechanism in the system that provides most of the data changes and external resource providers is limitation is the need to have entities that are used called the micro-service pool. A microservice is a in the main application and stored procedures. small piece of system that can reside on different This type of abstraction makes it possible to servers or even be embedded in a partition of an choose the most convenient provider for the application, and works with external APIs, data database and absolutely provides a connection to warehouses, or prepares scheduling events. the structure, as separate as possible from The basic access service (BDS) is a common dependencies. This principle is the principle of component for connecting to the data access level GRASP, Low Coupling & High Cohesion [14]. (DAL) and some necessary plug-ins: mapping, To understand below (Fig. 3), the main set of service data, etc. An internal database is an micro-services in system architecture is abstract layer that can be switched between presented. providers and has a single interface. The only Figure 1: Combined approach to sending messages Figure 2: Diagram of micro-service architecture Figure 3: Micro-services in the system External datasets will be processed by the Data The scheduler is the only module that can be Integration Service (DIS), which will then be either a separate service or a built-in part of the passed to a mapping process, where the data is developed system. For the data warehouse, SQL converted to an internal model. Authentication Server was chosen, which provides the best service (AS) is a modern generation of token connection experience and many features, such as systems called JWT (JSON Web Token). This triggers to schedule or even save data analysis if service allows you to authenticate and then necessary. identify moderators using only a hash with metadata sealed in it. The Geolocation Service Internal processes of the system (GS) is the "core" of the project and its main part. This means that the GS directly affects the data, To explain the implementation, consider the in addition, it must build linked lists and include Use-Case diagram in the Fig. 5, which presents some additional data about places and objects. It should be noted another pattern that was the two main users of the system: the administrator and the driver. used during the implementation of the system: the Routing Service (RS) is based and configured using the TomTom API. To reduce requests, a Proxy template [15, 16] has been implemented, which envelops this functionality and saves data to reduce the number of requests, thus reducing the cost of services (Fig. 4). Figure 5: Use-Case diagram As can be seen from the diagram, the driver has the following functionalities: go through the process of authorization and authentication, has automatic logging of its location and display in the application for administrators, can create requests to solve problems during trips, search for parking or repair; register intermediate statuses and Figure 4: Proxy Pattern terminate trips automatically or manually. In turn, the administrator monitors the For example, if a route has the same location, capabilities and responsibilities of drivers, the system will use the saved data instead of confirming actions, as well as coordinates and making a new request. solves problems as needed: creates new administrators and moderators, drivers, logs in the As shown in the Fig. 6 - the process of creating system, creates locations, fills in new information a driver begins with filling out a questionnaire and for system users, sets stop for repairs and parking, then it branches into two parallel processes, which solves problems and problems of drivers during can be asynchronous, which means the possibility trips, creates new routes and manages trips. of their delayed completion. If necessary, a The next step of implementation is the separate entry is created for the driver with a new functions of creating new entities of the system, bus or an existing one is selected. After filling out as shown below in the activity diagrams: the the questionnaire, you can additionally fill in the processes of creating a new driver, creating and contact details. Finally, all processes are making changes to routes and locations, creating synchronized and sent to the database. a trip and accompanying processes during its execution. Figure 6: Activity diagram. Creating a driver and route Creating and updating routes begins with a Fig. 7. The system also has an automatic time modal window that offers to specify or redefine calculation, which determines how much real time the starting point, if this has been done or the route is required to travel the distance based on the already has a starting position, the user can select geolocation of data. The process of creating new intermediate stops or change existing ones. metadata takes responsibility for specifying which The final step is the process of specifying the last bus, driver will perform the trip, as well as location, which cannot be changed after. The adjusting such parameters as date and time, etc. system automatically offers estimates of time and Finally, we note the life cycle of the entire route length based on data obtained during route system through a state diagram (Fig. 8), which calculation. indicates the process, starting from the creation of In order to start a trip, you need to create a new the user, ending with the trip process and logging schedule or choose an existing one, after which its final destination. the algorithm branches into two parallel processes: creating a system of stops with time Conclusions intervals, setting metadata for a specific trip, as in The developed system and the conducted in commercial projects. This project solves the researches introduce the service methodology for problem of bureaucracy when generating reports, creation or integration into the existing systems analyzing trips, creating plans, etc. But the most for simplification of processes of synchronization important aspect it covers is the need to between drivers and operators. The proposed synchronize information between operators and approaches allow you to customize the system to drivers. individual customer needs and allow you to As every professional employer wants to quickly expand the functionality regardless of provide good working conditions, and in the existing ones. transport industry there is a growing demand for As mentioned in the sections, each function or personnel management, and the staff is expanding micro-service corresponds to an independent every year, there is a need to quickly form trip micro-service, which helps to increase the schedules to avoid conflicts. Conflict situations stability of the system. Despite the fact that the mean overlapping schedules of routes, as well as system already has a lot of services to address the emergencies. . basic needs of customers, it has and will expand Figure 7: Activity diagram for creating a new schedule Figure 8: Life cycle. State diagram It should also be noted that iterative operations [3] Alam, Muhammad & Ferreira, Joaquim & were performed to increase optimization and Fonseca, José. (2016). Introduction to correctness of the system, which led to an increase Intelligent Transportation Systems. in possible connections to the tracking. All 10.1007/978-3-319-28183-4_1. locations are stored in chunks, and when the client [4] A. Nuzzolo and A. Comi, "Advanced public moves, it receives a new image with new data and transport and intelligent transport systems: cached previous ones, which saves memory and New modelling challenges," Transp. A, makes the application faster. Each route created Transp. Sci., vol. 12, pp. 674–699, Sep. 2016. by the user will be saved in the repository, and [5] Dinh Dung, Nguyen & Rohács, József & when the user tries to build a new route with Rohacs, Daniel & Boros, Anita. (2020). multiple repetitive routes, this will result in Intelligent Total Transportation Management retrieving the saved data instead of calling the System for Future Smart Cities. Applied API. This saves the client money and affects the Sciences. 10. 8933. 10.3390/app10248933. performance of the application. [6] Kuznichenko, S.,Buchynska, I.,Kovalenko, L.,Tereshchenko, T. Integrated information References system for regional flood monitoring using internet of things. CEUR Workshop Proceedings, 2019, 2683, стр. 1–5 [1] M. Karpinski, S. Kuznichenko, N. Kazakova, [7] Kuznichenko, S., Kovalenko, L., Buchynska, O. Fraze-Frazenko, D. Jancarczyk.. I., Gunchenko, Y. , Development of a multi- Geospatial Assessment of the Territorial criteria model for making decisions on the Road Network by Fractal Method. Future location of solid waste landfills. Eastern- Internet. 12. 201 (2020). European Journal of Enterprise DOI:10.3390/fi12110201. Technologies, 2018. Vol.2, No. 3(92). P. 21– [2] Z. Cortes, J. Andres; A. Serna, M. Dario and 31. DOI: 10.15587/1729-4061.2018.129287 A. Gomez.(2013). Information systems [8] S. Kuznichenko, I. Buchynska, L. applied to transport improvement. Dyna Kovalenko, Y. Gunchenko. Suitable site rev.fac.nac.minas. vol.80, n.180. ISSN 0012- selection using two-stage GIS-based fuzzy 7353 multi-criteria decision analysis. Advances in Intelligent Systems and Computing, 2020, 1080 AISC, стр. 214–230 [9] P. Du, J. Chen, Z. Sun, and Y. Li, "Design of an IoT-GIS emergency management system for public road transport networks," in Proc. 1st ACM SIGSPATIAL Int. Workshop GIS Emergency Manage., Bellevue, WA, USA, Nov. 2015, p. 12. [10] Robayet Nasim. Architectural Evolution of Intelligent Transport Systems (ITS) using Cloud Computing. Licentiate thesis. Karlstad University Studies, 2015:2. [11] Ricardo Salazar-Cabrera, Álvaro Pachón de la Cruz, Juan Manuel Madrid Molina, Sustainable transit vehicle tracking service, using intelligent transportation system services and emerging communication technologies: A review, Journal of Traffic and Transportation Engineering, Vol.7, Issue 6, 2020, P. 729-747, ISSN 2095-7564 [12] Kamel, Mohammed B.. (2015). Real-Time GPS/GPRS Based Vehicle Tracking System. International Journal Of Engineering And Computer Science. 10.18535/ijecs/v4i8.05. [13] Long Polling vs WebSockets vs Server-Sent Events, 2019. URL: https://medium.com/ system-design-blog/long-polling-vs- websockets-vs-server-sent-events- c43ba96df7c1 [14] Design model: Use-Case realization with GRASP patterns, 2001. URL: https://www.pearsonhighered.com/assets/sa mplechapter/0/1/3/0/0130925691.pdf [15] Design Patterns: Elements of Reusable Object-Oriented Software 1st Edition, Kindle Edition, by Gamma Erich, Helm Richard, Johnson Ralph, Vlissides John