# A Proposal for a Federated Learning Protocol for Mobile and Management Systems
## 6 Discussion  
The incorporation of Apache Kafka and the Firebase Realtime Database ensures a versatile and reliable communication channel, addressing potential challenges such as data loss. However, it is essential to acknowledge and discuss certain limitations and considerations. The proposed framework assumes a certain level of compatibility and integration with Google technologies, such as TensorFlow and Firebase. While this enables efficient operation within the Android ecosystem, it may pose challenges for organizations or systems using alternative technologies. Furthermore, the simulation results demonstrate the effectiveness of the communication protocol within a controlled environment. However, real-world implementation may introduce additional complexities and unforeseen challenges that require continuous evaluation and adaptation. TensorFlow Lite on Android devices does come with several limitations and constraints:  
* Constraints on Compatibility: TensorFlow Lite may not be fully compatible with all TensorFlow models and operations, especially more complex ones. Modifications or retraining might be necessary to adapt models to work with TensorFlow Lite. * Limitations on Model Size: TensorFlow Lite imposes restrictions on model size to accommodate the memory and storage limitations of mobile devices. This constraint can affect the types and sizes of models that can be deployed on Android. * Challenges with Custom Operations: TensorFlow Lite has limited support for custom operations, which can be challenging when working with models that rely on such operations. * Dynamic Models: Models with variable inputs or architectures may require additional considerations to ensure compatibility with TensorFlow Lite. Despite these limitations, TensorFlow Lite offers significant benefits, including improved performance, reduced model size, and offline inference capabilities. This makes it a valuable choice for running machine learning models on Android devices. Additionally, during the implementation, a limitation was encountered with the Firebase Realtime Database. This limitation is specifically related to naming restrictions, which enforce specific conventions to ensure compatibility. To work effectively with the Firebase Realtime Database, it is crucial to adhere to the prescribed naming conventions and structure names accordingly, especially for weights and biases. By following these  
Figure 9: The format of JSON messages. naming restrictions, the limitations associated with the Firebase Realtime Database can be effectively managed, ensuring smooth and consistent operation within the implemented communication protocol. The proposed KI Federated Learning Framework distinguishes itself from KafkaFed [16] through its versatile approach to communication channels. While KafkaFed primarily relies on Apache Kafka, the proposed framework integrates both Apache Kafka and the Firebase Realtime Database. This dual integration not only ensures robustness but also provides a backup communication method, mitigating potential data loss concerns. Additionally, the choice of Firebase Realtime Database facilitates real-time updates and synchronization, fostering efficient communication and coordination among distributed components. In terms of adaptability to the Android ecosystem, the KI Federated Learning Framework stands out as it is specifically tailored for emergency management applications on Android devices. Leveraging TensorFlow Lite and Firebase, it seamlessly integrates within the Android environment, contributing to enhanced privacy and real-time decision-making capabilities. The structured communication protocol proposed by the KI Federated Learning Framework, utilizing the JSON format, adds a layer of clarity and interpretability. The integration with Firebase Realtime Database in the KI Federated Learning Framework, while not explicitly emphasized in TFF [9], plays a crucial role. Firebase provides tools for automatic updates, enhancing the efficiency of communication between clients and the server.