Hi all! We are working on client/server code which allows remote users to control on-site hardware. The code uses sockets and the protocol is currently all strings. For example, the client may send "moveNegative,1,2000" to move axis-1 2000 steps in the negative direction. The server sends back a String describing the outcome of the request. The command strings are created at runtime based on user input. Generally speaking, everything is working well, but I am concerned about memory issues and the String pool. Can anyone suggest a place which tells how to design effective custom protocols for client/server setups? Thanks in advance. Stephanie
You can create a distributed object in java, c++ or some other language that has method for each of your commands. If you exposed this distributed object with CORBA then the protocol you'd be using would be IIOP.
Hey Stephanie, If your client and server both know, when a new message starts; what the contents of the message are; what the contents mean and when the message ends, then you have created your own 'protocol'. I haven't run into a memory problem with the String pool in any application I've created including some that parsed 1GB of String data. Test your server with a single client, then multiple clients and observe how much memory it uses. I don't think you'll have much trouble with memory.