Link to home
Start Free TrialLog in
Avatar of diandr
diandr

asked on

What type of comunication should I use?

I have a program client that I distribute on the internet. The program with the server is located on a dedicated server.
What type of component/connection should I use in Delphi(7 or 2005 or 2006) to comunicate between client and server in order to have 100% uptime and 100% no connection problem.

I have triied Indy 10 IdTCpCClient and IdTCPServer but the server every day is down and some clients can't connect to it.

Avatar of diandr
diandr

ASKER

I would be grateful for a sample of client and sever with 2-3 commands.
Avatar of diandr

ASKER

The client program just sends commands and receive answers from the server. With indy there was a problem like closing connection before the client actually closed the application.
what can of server you are building, is it satefull or statless ? ,
you can use also web services
ASKER CERTIFIED SOLUTION
Avatar of Scay7
Scay7
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of TheRealLoki
I've changed the server demo on Scay7's question so that you can send the server several commands, and it will respond.
e.g send the command "DATE", and the server returns the current date,
feel free to take a look if you like
https://www.experts-exchange.com/questions/21810377/Communication-between-2-programs-over-network.html
It's using the standard sockets, not indy or ICS
Indy 10 has a "Command Handler" way of doing the same thing, or you can do that bit yourself with WriteLn/ReadLn and "IF" statements.
Strangely, Version 9 was pretty stable for me, but I have the odd problem with version 1, and only version 10 seems to be supported these days.

Francois Piette's ICS is pretty easy to work with by using the <CRLF> as a delimiter for commands. (WriteLn, etc)
It's very simple, non blocking, and like Indy, has quite a few demos available for it. It does not (by default) use threads, so it has a lower server overhead.

Let me know if you'd like me to make a demo in either Indy or ICS, and if you require streaming data or just text commands/responses