Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Comunicate two Applications in one machine in Java

 
Carlos PQ
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
i would like to develop two differents applications that can comunicate with the other.
Both app will run in the SAME machine (so, i dont know if i still should use sockets... sockets are useful to comunicate apps running in different machines, no?)
Can someone help me??
Thank you very much.
 
Tom Purl
Ranch Hand
Posts: 104
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do you want them to communicate? Could you give us a general example? A lot of people could take a "shot in the dark" for this problem, but that probably wouldn't help you much.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13047
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One advantage of using sockets would be that if you ever need to move one application to another machine it will be simple.
Bill
 
Kathy Sierra
Cowgirl and Author
Rancher
Posts: 1589
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy -- if both applications are written in Java, you can use RMI. It handles all the low-level details of communicating over the sockets, and you get to act (almost) as though you are making local method calls. It's much higher-level than sockets and can free you to concentrate more on other things. You don't have to write your own protocol, since you're just making method calls.
And RMI is *very* easy to learn.
cheers,
Kathy
 
Prasad Babu
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using sockets would be better and easiest way to communicate between two applications running on the same machine or different machines.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic