Communication Protocol: The first iteration centred on establishing a robust communication protocol between the Phinsys Agent and the cloud-hosted web application. The aim was to test different secure communication layers that could be used to efficiently transmit metadata.
TLS Protocol: The initial tests were conducted using standard HTTP/HTTPS protocols due to their widespread use and built-in support for secure communication via TLS (Transport Layer Security). These protocols required rigorous testing to ensure that they could handle the specific needs of the Phinsys Agent, particularly in terms of performance and reliability under varying network conditions.
WebSockets: WebSockets were evaluated given the need for real-time communication and reduced latency for processing status updates. WebSockets offer full-duplex communication channels over a single TCP connection, crucial for scenarios requiring rapid updates of processing statuses and rule conditions between the cloud application and on-premise environments. WebSockets were tested for both performance and security, particularly focusing on their ability to maintain secure, persistent connections without introducing significant overhead.
gRPC: Another protocol we evaluated was gRPC, which is known for its high performance and support for various data serialization formats like Protocol Buffers. gRPC was particularly appealing due to its ability to efficiently manage remote procedure calls (RPCs) across distributed systems. gRPC was tested to assess whether it could provide a more performant and scalable solution compared to traditional HTTP/HTTPS or WebSockets, especially in scenarios involving complex data interactions between internal agent components and also between separate instances of the on-premise agents.
Conclusion: It was deduced that the communication of the internal Phinsys Agent modules would benefit from using gRPC and the communication with the cloud hosted web API should use HTTPS as the standard means of secure data transfer. Where two-way communication is required for status updates and processing rule evaluation, WebSockets will be used in conjunction with SignalR. SignalR was identified as the most suitable implementation of WebSockets as it provides automatic failover to other protocols if WebSockets is unavailable.