?
Solved

How to get applcations to talk to each other over the Internet?

Posted on 2012-08-17
9
Medium Priority
?
517 Views
Last Modified: 2012-09-03
I am a newbie and I would like to know the best and yet easy way to get at least two automated applications (e.g. One is a client and the other a server) to be able to communicate with each other over the internet.  They must be able to:

(i) The client Login into the server, e.g. log in name and password to prove a valid application wants access to system.
(ii) Avoid the client having to log in over and over again for each exchange.  Whit html, I know you can use cookies.
(iii) Communicate information via XML messages or another means that is better.
(iv) Communicate in a secure fashion.

I can do the above with 'html' web pages and a web server, but I know that there must be a better way to achieve the above.

I would like a breakdown showing each area I would have to learn with a URL if possible to concise information.

Example:  If one of the areas required would be XML parsing, I would like one of the following:
(a) A link to a web-page or Tutorial showing an example, or
(b) Your own brief description as to what would be required so I can then easily research the area on the internet.


Thanks
0
Comment
Question by:Hope4U
  • 4
  • 3
  • 2
9 Comments
 
LVL 28

Expert Comment

by:dpearson
ID: 38308714

I can do the above with 'html' web pages and a web server, but I know that there must be a better way to achieve the above.

Why would you not want to use a web server?  It would handle 90% of this for you much more easily than if you try to build it yourself.

In particular the cookie support for requirement (ii) and the use of https for requirement (iv) will come for free with a web server and be hard to achieve if you built your own server.

Doug
0
 
LVL 20

Expert Comment

by:gatorvip
ID: 38308732
This topic is very broad and I don't think you can find a "best and easy way," at least not in the way you are describing it. Is this supposed to be a class project of some sort, or are you just trying to learn for yourself?

to be able to communicate with each other over the internet.
What does this mean - are you looking for a web-based solution, in which a client using a web browser goes to www.yoursite.com and logs in? Or perhaps a Java applet (given that you cross-posted this in  the Java section)? Or you're just looking for TCP- or UDP-based (or some other protocol) self-standing application?

If it's a web-based solution, then you will probably want to stick to well defined platforms (like Apache, IIS, Tomcat, etc) on the server-end. As the previous poster said, those already fill a good amount of your requirements.
0
 

Author Comment

by:Hope4U
ID: 38308984
To All:
Would web services facilitate the above more easily than having to parse html pages?

To Gatorvip:  
The applications are my own custom developed ones - no IE or Firefox browser required for communication.  I am looking for my applications to be using TCP (since this is more reliable) to communicate with each other.
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 20

Accepted Solution

by:
gatorvip earned 1600 total points
ID: 38309609
0
 
LVL 28

Assisted Solution

by:dpearson
dpearson earned 400 total points
ID: 38309810

The applications are my own custom developed ones - no IE or Firefox browser required for communication.

It's easy to build a client that uses http for communication (e.g. just sending XML to a server).  It doesn't need to be a browser or have anything to do with HTML pages.  That part is the easy side.   E.g.  The httpclient library from apache commons (http://hc.apache.org/httpclient-3.x/) will handle all of the client side work for you.

The hard part here is building the server.  Doing that as a custom server is a lot of work.  Starting from a web server (e.g. Tomcat if you want to use Java) will give you support for HTTP communication (over TCP) for no work.  Then you can build your custom protocol (e.g. sending XML and receiving XML) on top of that.

I'm pretty sure that's the right path for you given what you've said so far.

Doug
0
 
LVL 28

Assisted Solution

by:dpearson
dpearson earned 400 total points
ID: 38310100
BTW, if you'd like an example of how to have a web server send and receive XML you can read about that here:
http://www.ibm.com/developerworks/web/library/x-servlets-and-xml/

It shows a simple servlet (which just means a piece of code that runs inside a web server and responds to requests) processing a request in XML and sending back XML.

Writing the client side for this would be pretty simple if you use a library (like httpclient referenced above) to handle the http protocol.

Doug
0
 

Author Comment

by:Hope4U
ID: 38310306
If there is technology out there already to make the task easier, I have no objections.  Hence if there is a server that can be utilized (e.g. Tomcat) I have no problem with that.
0
 
LVL 28

Expert Comment

by:dpearson
ID: 38310444
OK then I think we've covered (ii), (iii) and (iv) from your original list.

For (i) you can either use an existing authentication library (which will be secure but may take significant work to learn) or you can role your own.  If you're building your own, the general approach is that the client should hash the password before sending it to the server.  The server then stores just the username+hash(password) and verifies that.

The reason to use this approach is so that the password is never sent directly over the internet - only hash(password) is sent.  It also has the advantage that if somebody breaks into your server they can only read the hash(password) in your database - which is less useful than the plaintext password which a given user may have used on multiple different sites.

Doug

P.S. For additional security you can also consider adding "salt" to the passwords - see more here: http://en.wikipedia.org/wiki/Salt_(cryptography) and http://crackstation.net/hashing-security.htm
0
 

Author Closing Comment

by:Hope4U
ID: 38361109
Thanks guys for the advice.  Much appreciated since I now know which path I should go in.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses
Course of the Month15 days, 14 hours left to enroll

850 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