The Impossibility of Exactly-Once Delivery

The Impossibility of Exactly-Once Delivery

The similarity between the two generals problem and exactly-once delivery is quite striking.

Exactly-once delivery defined

First of all:

Exactly-once delivery guarantee is the guarantee that a message can be delivered to a recipient once, and only once.

While having a message be delivered only once by a recipient, is the norm, it is impossible to guarantee it.

Proof by contraposition and the two generals problems

The similarity between the two generals problem and exactly-once delivery is quite striking. We again have two parties trying to communicate some intent, with a potential for loss of packages. Where the two generals had to agree on a time to attack, here the two processes have to agree that the second has successfully received the message.

Let’s assume that a protocol exists which guarantees that a recipient receives a message from the sender once and only once. Such a protocol could then solve the two generals problem! Representing the time of the attack as the message, the first general (the sender) would only need to adhere to the protocol for the second general (recipient) to have received the attack time exactly one time. However, since we know that this is not possible, we also know that exactly once is not possible.

Direct proof

In case it’s easier to conceptualize, I’ll try to prove the impossibility of exactly-once using a direct proof. For this, let’s assume:

  1. The sender and recipient are operating in the real world, meaning non-zero transport and processing times (and no strict consistency)
  2. The sender and recipient do not have access to each other’s internal state. This means that the recipient is not aware of the intent to send a message unless told by the sender
  3. Transport of the messages are unreliable
  4. The recipient has to do some processing on the message (this means the message cannot simply be dropped or lost)
  5. The operation is time-bound: processing has to complete within a non-infinite period of time

microservices software-engineering messaging software-architecture software-development

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Offshore Software Development - Best Practices

To make the most out of the benefits of offshore software development, you should understand the crucial factors that affect offshore development.

Software Developer vs Software Engineer — Differences: Bogus or Real?

In this article, see if there are any differences between software developers and software engineers. What you’re about to read mostly revolves around my personal thoughts, deductions, and offbeat imagination. If you have different sentiments, add them in the comment section, and let’s dispute! So, today’s topic…

5 Core Criteria for Selecting Software Development Company - TopDevelopers.co

Check out these five criteria for the selection of your software vendor, and you will never regret having the wrong quality product made for you.

Wrestling Betting Software Development | WWE Betting Software Developers

Wrestling betting software development solutions from expert Wrestling betting app and software development company delivers ultimate betting experience. Chat with us.

Serverless Vs Microservices Architecture - A Deep Dive

Companies need to be thinking long-term before even starting a software development project. These needs are solved at the level of architecture: business owners want to assure agility, scalability, and performance.