Skip to content

Idempotent message handling #12

@sgryt

Description

@sgryt

Some of the Qaiain clients will only be occasionally connected. They will have to store pending messages in some durable store (filesystem for iOS, maybe IndexedDB for appCache'd laptop versions in the near future).
This brings about the possibility of having duplicate email-requests send to Qaiain, if the updating of the clients durable store fails, after successfully delivering an email request to Qaiain.
It would be unfortunate to have duplicates, as they will potentially look like spam to recipients, and also just be annoying to the recipients if arriving more than once in their inbox.
One way of avoiding this is to have Qaiain support idempotent messaging - where part of the contract could be a unique identifier, generated by the client, that Qaiain could use to check if the message has already been delivered to the email service backend (Mailgun, or the like).

I haven't spend much time researching alternative ideas, so any feedback is most welcome. Perhaps the email backend service used supports this in itself, or we may need Qaiain to have a persistent storage of already-delivered message identifiers?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions