These are chat archives for RBMHTechnology/eventuate

12th
Feb 2018
gabrielgiussi
@gabrielgiussi
Feb 12 2018 20:18

Hi, I'm implementing the stability part for pure op-based crdts and I must send local replicaVersionVectors to other endpoints.
These could be sent

  • In ReplicationRead
  • In ReplicationReadSuccess
  • As independent messages (currently I'm having troubles to send this to remote Replicators, the message is not being received and I'm seing "received dead letter from" in the logs).
    For example
    case r @ ReplicationReadSuccess(events, _, _, targetLogId, _) =>
        val currentTargetVersionVector = replicaVersionVectors(targetLogId)
        val updated = events.filterNot(_.before(currentTargetVersionVector))
        val reply = r.copy(updated, currentSourceVersionVector = clock.versionVector)
        val sdr = sender()
        sdr ! prepareReplicaVersionVectors(targetLogId) // <----------- added this line
        sdr ! reply
        channel.foreach(_ ! reply)
        logFilterStatistics("source", events, updated)

The third option puts extra messages in the wire so I think it would be better to include this information in ReplicationRead or ReplicationReadSuccess messages.
I ask this because modifying ReplicationRead or ReplicationReadSuccess requires many changes, so I prefer to reach some agreement before.

Thanks

gabrielgiussi
@gabrielgiussi
Feb 12 2018 22:09
It would be easier to include this information on ReplicationReadSuccess because they are created by the EventLog who has the replicaVersionVector, while ReplicationRead are created by the Replicator hence it should ask to the EventLog.