title: Inter-Process Synchronization with Barrier
body: <p>I have a program in Java that performs some computation in parallel. I can either run it on a single machine or using multiple different machines. </p>
  
  <p>When executing on a single machine, thread synchronization is successfully achieved by using CyclicBarrier class from java.util.concurrent.CyclicBarrier package. The idea is that all the threads must wait for the other threads to arrive at the same point before proceeding with the computation.</p>
  
  <p>When executing on multiple different machines, inter process communication is implemented via RMI (Remote Method Invocation). I have the same problem on this situation and I want the threads of these processes to wait for the others to arrive at the same point before continuing. I cannot use a shared CyclicBarrier object between the different processes because this class is not serializable.</p>
  
  <p>What are my alternatives to get this barrier behavior on threads executing on different processes on multiple machines?</p>
  
  <p>Thanks</p>