code: public synchronized void execDistributed(@NonNull TrainingMessage message) {
          /**
           * Basically we should batch messages coming from different TrainingFunctions on spark executor side here.
           * So we pack them into batches, and send over the wire to selected Shard
           */
          Frame currentFrame;
          if ((currentFrame = frames.get(message.getClass().getSimpleName())) == null) {
              currentFrame = new Frame<>(BasicSequenceProvider.getInstance().getNextValue());
              frames.put(message.getClass().getSimpleName(), currentFrame);
          }
  
          currentFrame.stackMessage(message);
  
          // TODO: make this threshold variable
          if (currentFrame.size() >= 128) {
              transport.sendMessage(currentFrame);
              currentFrame = new Frame<>(BasicSequenceProvider.getInstance().getNextValue());
              frames.put(message.getClass().getSimpleName(), currentFrame);
          }
  
          //transport.sendMessage(message);
      }
docs: This method dispatches TrainingMessage to ParameterServer network
  
  PLEASE NOTE: This method is synchronized and *periodically* becomes blocking by design
  @param message