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

Introduce queues to improve inter-bot communications #18

Open
neomatrix369 opened this issue Apr 16, 2022 · 2 comments
Open

Introduce queues to improve inter-bot communications #18

neomatrix369 opened this issue Apr 16, 2022 · 2 comments
Assignees
Labels
difficulty: intermediate Some prior knowledge required enhancement New feature or request help wanted Extra attention is needed priority: high Should be completed in the next Sprint refactor spike

Comments

@neomatrix369
Copy link
Owner

As the project started off as a demo project, inter-chatbot communications are not the most optimum.

Also if we would like to introduce a frontend via #17 then the interactions would be best handled by a queue.

Spikes and prototypes to come up with a queue would be a great start, some examples of queues could be:

  • JMS
  • ActiveMQ
  • RabbitMQ
  • Kafka

Although for all intent and purpose of this project a simple queueing library is more than enough - a simple approach is a good start.

@neomatrix369 neomatrix369 added enhancement New feature or request help wanted Extra attention is needed labels Apr 16, 2022
@yugoccp yugoccp added difficulty: intermediate Some prior knowledge required priority: high Should be completed in the next Sprint labels Apr 23, 2022
@yugoccp yugoccp self-assigned this May 5, 2022
@yugoccp
Copy link
Collaborator

yugoccp commented May 5, 2022

Hi @neomatrix369! Wish to have clearer idea about this issue.

Thought the simplest architecture to satisfy most of the current features:
Screen Shot 2022-05-05 at 00 37 45

  1. Chatbot produces message to message.post queue
  2. Mediator consumes message from message.post queue
  3. Mediator wait 4 sec, log message and post to message.display queue
  4. Chatbot consumes messages from message.display queue

Mediator have some control over the conversation, such as wainting 4 sec to display next question and log messages

Drawbacks:

  • Eventually a chatbot can reply itself

@neomatrix369
Copy link
Owner Author

neomatrix369 commented May 7, 2022

Nice idea, let's think about it while also taking a couple of steps back and do the following:

  • come up with a simple queue system ourselves between the chatbots and connecting world (improving the current logic)
  • then make another solution using some lightweight queues library
  • try to do a spike via RabittMQ or ActiveMQ
  • try a spike with Kafka and zookeeper

Let's do a spike first and then move to a complete solution driven by tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: intermediate Some prior knowledge required enhancement New feature or request help wanted Extra attention is needed priority: high Should be completed in the next Sprint refactor spike
Projects
None yet
Development

No branches or pull requests

2 participants