DESIGN AND IMPLEMENTATION OF A DIGITAL TWIN OF THE KAZAN CITY PARKING SPACE
Abstract
This paper addresses the development of a digital twin for the parking infrastructure of Kazan. To implement this, a software system based on a microservices architecture was developed, comprising client-side and server-side components, a data storage layer, a message broker, a proxy server, and a forecasting microservice. The GeoJSON format is used to transmit geospatial data between the server and client, enabling the display of parking zones, points of interest, and other urban features on an interactive map. On the client side, this data is rendered as distinct layers that the user can manage via the map legend. Two types of storage are employed for data management within the digital twin: a PostgreSQL relational database with the PostGIS extension and a Redis non-relational store. The server-side component handles request processing, database interaction, and business logic execution. The system's server-side logic largely utilizes the asynchronous programming paradigm, allowing for the simultaneous handling of multiple I/O operations without blocking the processing of new incoming requests. The FastStream library facilitates messaging between the main application and the forecasting microservice; the latter receives tasks, performs calculations, and writes the results to the database. For scenario modeling, the server-side component implements specific logic to handle user-initiated changes. When a scenario is created, the parking system's source data remains unaltered. Instead, all user actions are recorded as a set of modifications relative to the baseline model-such as adding a new parking zone, adjusting capacity or pricing, adding urban infrastructure elements, or removing objects from the scenario. The client-side component of the digital twin is implemented as a web application, with its interface developed using TypeScript. Interaction with the server-side component occurs via HTTP requests. The client application consists of four pages: an interactive map, scenario modeling, a view for saved scenarios, and a data upload interface. Each scenario can be opened in turn to compare how projected parking occupancy changes. This enables the system to assist in evaluating potential management decisions in advance and selecting the most suitable option for developing parking infrastructure. Thus, the client-side component facilitates visual and interactive user engagement with the digital twin. Upon completion of the study, the system was deployed, confirming the operational viability and functionality of all its components.