Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message enforcement architecture #24

Open
ForNeVeR opened this issue Dec 28, 2017 · 0 comments
Open

Message enforcement architecture #24

ForNeVeR opened this issue Dec 28, 2017 · 0 comments
Assignees

Comments

@ForNeVeR
Copy link
Member

So, we want to always keep track of what we've sent to both of the chat rooms (XMPP and Telegram). Here I'll describe a general strategy, but it looks like it'll be most useful for XMPP (because the transport is extremely unreliable).

  1. When sending a message to the room, bot should also save that message to the internal storage.
  2. Before sending any additional messages to the same chat, bot should make sure the message it sent has been received. To do that, it just should listen for the room messages and await its' own response.
  3. If the response haven't been received after a timeout (say, 5 minutes), bot should then reconnect to the room (to make sure nothing's wrong with the connection), receive all the room messages through MAM, and then send the message again if it wasn't found in the full history archive.
  4. The bot internal storage should be persistent, so after reboot it still will try to deliver all the messages in the right order.

Yes, our bot should maintain a full history archive (as seen by the server through MAM) and that'll be additional challenge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant