4

I went across all the links on java Inter Process Communication, but I couldn't get an exact answer. I am on my way to write a java service which I want to communicate with a service running on my system. The service may be C, C++, or a service running on a hardware device. Which is the best way? Is it possible to use RMI in this case? If yes how can I implement that?

Servy
  • 202,030
  • 26
  • 332
  • 449
Nikhil
  • 2,857
  • 9
  • 34
  • 58

2 Answers2

3

RMI is generally designed for interprocess communication between Java applications. If you need language-agnostic technology, currently the most popular are webservices (SOAP or REST based) or CORBA. But as the other service is going to work on "hardware device" they may be too heavyweight in which case you could think of your own communication protocol eg. based on TCP/IP connection.

Adam Dyga
  • 8,666
  • 4
  • 27
  • 35
2

You can go through online tutorials on CORBA with JAVA technologies. You can also refer oracle documentation for the same

Refer http://docs.oracle.com/javase/1.4.2/docs/guide/idl/jidlExample.html

asifsid88
  • 4,631
  • 20
  • 30
  • Is it possible using CORBA to communicate between a java service and a c++ service? – Nikhil Feb 19 '13 at 10:39
  • Yes it is possible. You can have your service in any programming language. Actually this CORBA compiles into native language _(idl)_ . Go through CORBA it will surely give you the desired result :) – asifsid88 Feb 19 '13 at 10:44
  • @nik yes, have a look at the docs – Adam Dyga Feb 19 '13 at 10:45