Link to home
Start Free TrialLog in
Avatar of Geert G
Geert GFlag for Belgium

asked on

Inter Delphi communication ways

Hi delphi devs,

I'm looking for a way to let delphi programs communicate across the globe without the use of database.
I'm writing the programs in D2010 at the moment.

Basically i need to send a piece of text (integers, strings, etc) and the remote side has to send a similar response.

What resembles this idea most would be a user requesting a report by a certain time.
>> The app sends the name of the report, the destination folder of the report and the time it has to be delivered.
>> The backend app receives this info, prepares the report and places the report on that specifc folder

I'm looking for ideas, and some code of how the communication would work.
> I'm not looking for a full back-end communication framework ...

Something like this:
procedure Message(ReportName, DestFolder: string; DeliveryTime: TDateTime;
  var ReturnMessage: string);
begin
  ... your code ideas ...
end;

this requires 2 sides: the sending app code and the remote app code.

ideas with existing components (like Indy) are also welcome

I'll probably find a way myself, but asking a question here, may give more perspective and ideas.
Avatar of aikimark
aikimark
Flag of United States of America image

Even though it is a bit bloated, XML is a fairly standard data exchange format.

You might also consider JSON or some other mark-up standard, such as YAML.  Most of these formats have less overhead.
SOLUTION
Avatar of lomo74
lomo74
Flag of Italy 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
I see here multiple data to transfer. Main is report definition (description,title,column titles, some other info) and real data (two xml nodes). So I would go with custom xml (maybe with use of Indy or ICS) where part of it is allocated for report (first node) and other one for data. Data node will introduce as normal data XML with a fields description.
Avatar of Geert G

ASKER

i'm looking for the actual mechanism used for sending/receving the data between the apps
what the data format is and the interpretation of it is irrelevant at this point

i have used soap too.
It's probably my code, but this soap gets stuck every so often ...
If you want some assurances that the message will get through, use a mail protocol.  However, you should be able to do this with simple TCP.  Do not use UDP.

In order to make TCP work, you will need to get past firewalls.
Hi Geert, Am i right in assuming you don't want a "middle man" in this, i.e. web services?
Avatar of Geert G

ASKER

no middle man, you'r right, just direct delphi to delphi communication

i know not to use UDP > delivery is not guaranteed
ASKER CERTIFIED SOLUTION
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 Geert G

ASKER

i don't need encryption
this is strictly a system internal to the company

security is taken care of by our network team
If you are communicating out on the Internet and not behind a company's firewall, all your data can be seen.
Avatar of Geert G

ASKER

i'm always going to be behind a company firewall with this
and i'm not going to repeat it a third time !

so stop giving those remarks about security
@Geert

When you stated "communicate across the globe", that does not imply that you are behind a firewall.

"i'm not going to repeat it a third time"
This is the first time you've stated your run-time configuration in this thread.  I won't mention security again.
Avatar of Geert G

ASKER

closing ... again