I have a system in which I need bidirectional communication betwen the client and the server. In some instances the client needs to initiate communication with the server to ask a question, query status, get some data, etc. {We have an AI system that performs repetiative tasks, monitoring, report generation, alerting, etc. and clients apps that allow us to interactive with the server.} In other instances, the server needs to report some change in status or an alert to the client. We're using .NET to implement the system and have looked at a number of different architectures:
A) Open a TCP channel and manage the communications at a low level. This seems to meet our needs but has been rather unstable primarily because our teams lack good experienced in low level communications protocols.
B) Use .NET remoting in which both systems are acting as host - the client registeres the server as a remoting host and once a connection is established, the server goes ahead and registeres the client as a remoting host under a difference channel. This seems to work okay for basic messaging but there are instances in which we need to maintain a "conversation" between the client and the server. Having mutliple clients under this architecture seems to be a bit challenging.
C) Forget bidirectional communication and use a poll architecture to poll the server for new messages - works okay but creates an overly chatty system and makes "conversations" between client and server challenging.
Any thoughs on the best approach? Any different approaches recommended?