Skip to content

Persistence

Kévin LOVATO edited this page May 26, 2014 · 26 revisions

Being a peer to peer bus, Zebus cannot rely on a central broker to deliver the messages to a peer that was down when it comes back up. We worked around this problem by creating a Persistence Service, a peer that stores the transmitted messages to replay them to a peer when it comes back up.

Normal behavior

During normal operations, a peer transmits a message to a destination peer directly, but it also sends a copy of that message to the persistence peer.

persistence_normal_behavior_first_step

When a message is processed by the destination peer, it sends a message to the Persistence Service to acknowledge the fact that it was processed.

persistence_normal_behavior_first_step

This means that if a message is not processed, for example when a peer is down, it will be stored in the persistence for the time being.

Service restart

persistence_restart_replay_phase

Replay phase

persistence_restart_replay_phase

Safety phase

persistence_restart_replay_phase

Normal phase

persistence_restart_replay_phase

Clone this wiki locally