Articles | Open Access | DOI: https://doi.org/10.37547/tajet/Volume06Issue12-09

PROTO REFLECTION IMPLEMENTATION FOR DYNAMIC INTERACTION WITH GRPC SERVICES IN HIGH-LOAD SYSTEMS

Kish Aleksei , Senior Software Engineer / Technical Owner at Semrush Spain, Barcelona

Abstract

This paper introduces SwiftProtoReflect, a Swift library that implements Proto Reflection to enable dynamic interaction with gRPC services without the need for precompiled code from `.proto` files. Addressing the inherent limitations of Swift in handling Protocol Buffers—such as restricted dynamic code generation and limited reflection capabilities—the research employs theoretical analysis of these constraints and develops an innovative solution utilizing descriptors and dynamic message handling. The main results demonstrate that SwiftProtoReflect allows developers to define Protocol Buffers message structures dynamically, serialize and deserialize messages, and access message fields at runtime. This advancement overcomes existing barriers, offering enhanced flexibility, scalability, and performance comparable to statically generated code. Concluding, SwiftProtoReflect significantly contributes to the data engineering field by filling a critical gap in the Swift ecosystem, enabling efficient development of high-performance and adaptable applications. The novelty of this work lies in its original technological solution, expanding Swift's capabilities and providing practical benefits for high-load systems and microservice architectures.

Keywords

Swiftprotoreflect, proto reflection, protocol buffers

References

gRPC //Microsoft. [Electronic resource] – URL: https://learn.microsoft.com/en-us/dotnet/architecture/cloud-native/grpc

Sangwai A. et al. Barricading System-System Communication using gRPC and Protocol Buffers //2023 5th Biennial International Conference on Nascent Technologies in Engineering (ICNTE). – IEEE, 2023. – С. 1-5.

Biswas R., Lu X., Panda D. K. Accelerating TensorFlow with Adaptive RDMA-Based gRPC //2018 IEEE 25th International Conference on High Performance Computing (HiPC). – IEEE, 2018. – С. 2-11.

Barik R. et al. Optimization of Swift Protocols //Proceedings of the ACM on Programming Languages. – 2019. – Т. 3. – №. OOPSLA. – С. 1-27.

Nimpattanavong C. et al. Improving Data Transfer Efficiency for AIs in the DareFightingICE using gRPC //2023 8th International Conference on Business and Industrial Research (ICBIR). – IEEE, 2023. – С. 286-290.

de Matos F. F. S. B., Rego P. A. L., Trinta F. A. M. An Empirical Study about the Adoption of Multi-language Technique in Computation Offloading in a Mobile Cloud Computing Scenario //CLOSER. – 2021. – С. 207-214.

Liang L., He Z. The Design of a Protocol Buffer Library for Vala //2021 IEEE 15th International Conference on Electronic Measurement & Instruments (ICEMI). – IEEE, 2021. – С. 51-55.

Blyth D. et al. ProIO: An Event-Based I/O Stream Format for Protobuf Messages //Computer Physics Communications. – 2019. – Т. 241. – С. 98-112.

Article Statistics

Copyright License

Download Citations

How to Cite

Kish Aleksei. (2024). PROTO REFLECTION IMPLEMENTATION FOR DYNAMIC INTERACTION WITH GRPC SERVICES IN HIGH-LOAD SYSTEMS. The American Journal of Engineering and Technology, 6(12), 84–91. https://doi.org/10.37547/tajet/Volume06Issue12-09