Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Seeking suggestion on RPC - HTTP

 
kris reddy
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
Two EJB's talk to each other via Remote Procedural Call's. Web Services employ HTTP for communication of data between java components.
Which of the above 2 ways is a better way of data communication between Java components in a distributed environment?
Any input on this is appreciated.
Thanx
 
Freddy Flintpedra
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would have to say HTTP, since then you are that much closer to being able to communicate with anything else that can also communcate via HTTP, not just java apps over RMI
SOAP is basically RPC over HTTP, and is in many ways lacking
do a web search for:
Representational State Transfer
think of REST as using HTTP verbs (GET, PUT, POST, DELETE) to act on data objects, and you will have a solid foundation to build on.
when you need something from another node, use GET
when you want to store something to another node, use PUT
when you want to remove something from another node, use DELETE
when you want to change the state of an object on another node, use POST
 
Vinod John
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by kris reddy:
hi,
Two EJB's talk to each other via Remote Procedural Call's. Web Services employ HTTP for communication of data between java components.
Which of the above 2 ways is a better way of data communication between Java components in a distributed environment?
Thanx

In general, I think, RMI should be more efficient than HTTP. Here the communication is between two EJB (I assume they are no collocated), so we may have to give RMI (a form of RPC) more preference but if the EJB's are seperated by a firewall, RMI will be little inefficient.
 
Buba Dragon
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you looked at Voyager? It is essentially a better RMI with some very nice features.
http://www.recursionsw.com
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic