I've built a socket/app server using indy 9.x (it has to be crossplatform capable). It works fine on both Windows and Linux. When a client connects a thread get spawned that deals with the request etc.
My server does the following: A client connects via tcp socket sending a request (just a pipe delimited string at this point with the request command and data), the server creates the thread, parses the request and in a critical section does the action i.e. lookup a some data or creates a encrypted code etc. and then writes the result back to the client.
Everything works great except that the response time is on avg 6 - 7 requests that can be processed per second. Embedding the functionality into the client get's a response of 30-60 transactions per sec. I know it will be slower but by this margin? Am I doing something wrong or is this the nature of the beast?
I cannot embed it in a client as applications written in anything from Java, Delphi, C++, VB, C# to Perl etc must be able to connect and use it.
Is there a better way of doing this kind of thing?