Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Inter Delphi communication ways

Posted on 2013-05-15
14
Medium Priority
?
321 Views
Last Modified: 2013-09-05
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.
0
Comment
Question by:Geert Gruwez
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
14 Comments
 
LVL 46

Expert Comment

by:aikimark
ID: 39170184
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.
0
 
LVL 8

Assisted Solution

by:lomo74
lomo74 earned 1000 total points
ID: 39170655
I'd go with SOAP. It has a quite heavy overhead, but it allows function calls to run across the internet easily. Delphi also eases the process of creating client and server code through its wizard.
You can also develop client and server using different languages (I personally developed many applications mixing Delphi, C#, Java and PHP).
If bandwidth is an issue, JSON is a good lightweight alternative. More info here, along with links to Delphi JSON implementations.
0
 
LVL 27

Expert Comment

by:Sinisa Vuk
ID: 39171478
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.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 38

Author Comment

by:Geert Gruwez
ID: 39174014
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 ...
0
 
LVL 46

Expert Comment

by:aikimark
ID: 39175345
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.
0
 
LVL 15

Expert Comment

by:mikelittlewood
ID: 39189990
Hi Geert, Am i right in assuming you don't want a "middle man" in this, i.e. web services?
0
 
LVL 38

Author Comment

by:Geert Gruwez
ID: 39190691
no middle man, you'r right, just direct delphi to delphi communication

i know not to use UDP > delivery is not guaranteed
0
 
LVL 46

Accepted Solution

by:
aikimark earned 1000 total points
ID: 39190714
In one system I designed, machines established TCP connections when they needed to talk to the server.  Indy components were used.  We used the machine name and a port number when specifying the TCP address.  We encrypted our data stream, since we couldn't be sure if someone was sniffing packets somewhere in the network.  We also included other message validation methods and a hash of the data to help ensure the integrity of communication.

Even though that was in a network, I don't see any reason you can't do something similar with TCP/IP.
0
 
LVL 38

Author Comment

by:Geert Gruwez
ID: 39190828
i don't need encryption
this is strictly a system internal to the company

security is taken care of by our network team
0
 
LVL 46

Expert Comment

by:aikimark
ID: 39190845
If you are communicating out on the Internet and not behind a company's firewall, all your data can be seen.
0
 
LVL 38

Author Comment

by:Geert Gruwez
ID: 39207302
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
0
 
LVL 46

Expert Comment

by:aikimark
ID: 39207469
@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.
0
 
LVL 38

Author Comment

by:Geert Gruwez
ID: 39215804
0
 
LVL 38

Author Closing Comment

by:Geert Gruwez
ID: 39466967
closing ... again
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question