Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the ways of interchanging string data between clients and a server in Delphi?

Tags:

client

delphi

I have a server and some clients (about 50) in an intranet. The clients send short (about 40 character) string data to the server and the server answers with a similar string. There are up to (but not permanently) 2-3 requests per second for each client. The server has to serialize the requests to get the response strings.

The system should have as less as possible impact on the network as possible (i.e. the server may run something like a webserver already). It should be as easy to install and administer as possible.

What are the possibilities to achieve this using Delphi (Client: D7, Server up to D2010)?

like image 367
Uwe Raabe Avatar asked Dec 05 '22 04:12

Uwe Raabe


2 Answers

I use the Synapse library for such a simple server. Its lightning fast, very light, and threads easily. The demo Echo in the main synapse install is a fantastic start for what your trying to do. If you are going to be performing database access inside each request/response thread then I strongly also suggest looking at the connection pool example by Cary Jensen to keep your database connections in check.

like image 141
skamradt Avatar answered Feb 15 '23 22:02

skamradt


TCP, definitely. But I'd like to give a vote for ICS. Never liked Indy ...

like image 30
gabr Avatar answered Feb 15 '23 22:02

gabr