4

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)?

Uwe Raabe
  • 45,288
  • 3
  • 82
  • 130

5 Answers5

5

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.

skamradt
  • 15,366
  • 2
  • 36
  • 53
  • Given the download page Synapse has still only experimental D2009 support. This doesn't give much confidence IMHO. – Uwe Raabe Nov 14 '09 at 10:25
5

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

gabr
  • 26,580
  • 9
  • 75
  • 141
4

What about Indy's TIdTCPServer and TIdTCPClient? They provide command handlers, which makes implementing text-based protocols very straight-forward.

jpfollenius
  • 16,456
  • 10
  • 90
  • 156
2

There are a lot of options.

Ultimately, I agree with Smasher and like using sockets. They're quick, easy and portable. If you're dealing with a fairly simple protocol and don't need a full n-tier solution, creating a TCP or HTTP server application is dead simple, very light weight, and easy to make compatible with any client. You can even add SSL support to these stand alone applications without having to configure a web server or interfering with it, if it's already running on the same box.

Community
  • 1
  • 1
Bruce McGee
  • 15,076
  • 6
  • 55
  • 70
0

I use RemObjects SDK for this sort of purpose. It takes care of all the difficult stuff, and I just ask it to connect and make function calls to pass the data.

mj2008
  • 6,647
  • 2
  • 38
  • 56