-1

I need to send an instance of an object from one process to another (both Java) and get the changed version back. There are gonna be lots of this remote functions. (actually, one of the processes is something like DataBase wrapper)

What is the most developer friendly way to do this? i.e. that adding and calling these function should be easy.

MBZ
  • 26,084
  • 47
  • 114
  • 191

2 Answers2

1

The most developer friendly way is to use one process. You wouldn't use multiple processes unless you have a very good reason to do so.

Possibly the simplest to use is RMI however it will pass by value, not reference so you have to return the changed object.

Peter Lawrey
  • 525,659
  • 79
  • 751
  • 1,130
1

The simplest solution to your problem in Java is to use RMI. Use RMI in Java is really transparent, you can invoke methods on remote objects and you are able to pass value to them in the same way you do it with your local objects.

Here a simple tutorial from official documentation.

dash1e
  • 7,677
  • 1
  • 30
  • 35