What are the ways to exchange string data between clients and server in Delphi?

I have a server and some clients (about 50) on the intranet. Clients send short (about 40 characters) string data to the server, and the server responds with a similar string. For each client, up to (but not constantly) up to 2-3 requests per second. The server must serialize requests to receive response strings.

The system should have as little impact on the network as possible (i.e. the server can run something like a web server already). It should be as simple as possible to install and administer.

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

+4
source share
5 answers

What about Indy TIdTCPServer and TIdTCPClient ? They provide command handlers, which makes the implementation of text protocols very straightforward.

+4
source

I use the Synapse library for such a simple server. Its lightning fast, very light and easy. The demo echo in the main synapse setup is a fantastic start to what you are trying to do. If you intend to access the database in each request / response stream, I also suggest looking at an example of the connection pool from Cary Jensen to keep your database connections under control.

+5
source

TCP, definitely. But I would like to vote for ICS . Never loved indie ...

+5
source

There are many options .

Ultimately, I agree with Smasher and love using sockets. They are fast, lightweight and portable. If you are dealing with a fairly simple protocol and do not need a complete n-level solution, creating a TCP or HTTP server can be simple, very lightweight and easily compatible with any client. You can even add SSL support to these standalone applications without having to configure or interfere with the web server if it already works in one window.

+2
source

I use the RemObjects SDK for this kind of purpose. He takes care of all the difficult things, and I just ask him to connect and make function calls for data transfer.

0
source

All Articles