## 3 File Synchronization Framework  
This section describes the file synchronization framework added as a module to the existing Communication Framework (CM) [32]. CM is a communication framework that provides various application-level communication services required for client-server application development. Application developers can easily implement functions such as file transfer, social network service, and message transfer, as well as basic services such as server login and user management, by using the application programming interface (API) provided by the CM library. Since CM provides various options for each communication service through API parameters and configuration files, developers can choose different service policies according to application requirements. Among various services, the CM file synchronization service is systematically connected with existing CM services such as user management and file transfer, making it easy to develop a personal cloud storage service. The file synchronization process proposed by the CM file synchronization framework was described in detail in our previous work [33], and this paper focuses on the mechanism for manually or actively changing the file mode within the file synchronization service. In  
this paper, we assume that one client and server are considered for the file synchronization target, and that one-way synchronization that synchronizes the server files based on the client's file is used. We do not yet cover further extensions such as bidirectional synchronization, multiple logins from the same client, and file sharing with other clients. Figure 1 shows the structure of CM file synchronization service. The client and server applications each use CM as the underlying communication framework. The file synchronization common module is a CM module commonly used by both the client and the server, and is responsible for detailed synchronization processing, synchronization event management, synchronization, and file mode information management. The directory-monitoring task is a module running as a separate thread to detect changes in the synchronization directory on the client-side CM. When the client stops synchronization, this monitoring task is also stopped, and when the synchronization is restarted, the monitoring task is also restarted. The active file mode change task is responsible for actively changing the file mode according to the synchronization directory activation status in the client-side CM. The details about changing the file mode are described in detail in the next section. The block checksum generation task is a module that selects files to be synchronized with a separate thread in the server-side CM and creates a block checksum for each file. This module works by creating a thread for each client only while performing synchronization with the client. The client can start or stop the file synchronization service after logging into the server. When the client starts the file synchronization service, CM synchronizes the files in the client's synchronization directory with the server. The server-side CM manages a separate synchronization directory for each client. After synchronization with the server is completed, the client CM continues to monitor the client's synchronization directory and repeats synchronization with the server whenever an event such as file addition, modification, or deletion occurs. Figure 2 shows the core classes related to file synchronization in client and server-side CM. Other CM modules are classes that support services and inter-node communication other than the file synchronization and are simply shown because they are not core modules of this paper. File synchronization common classes play the same role in the CM server and client. CMFileSyncManager provides detailed methods required by the file synchronization algorithm, such as the start and end of file synchronization, file block checksum calculation, synchronization completion confirmation, and file mode change.