Giter VIP home page Giter VIP logo

orders-collector's People

Watchers

 avatar

orders-collector's Issues

Duplicated orders to the same supplier created - race condition

Steps to reproduce

Assuming there are no active orders to the supplier.
Place orders to the same supplier at the same / similar time by different users.

User1: [Restaurant1] item 1
User2: [Restaurant2] item 2

Expected

The order to the supplier should be created, both items added to the order.

Actual

Occasionally, two orders to the same supplier are created with one item each.

Multitenancy support

Problem

Currently, the single instance of bot can only work with a single conversation as all the commands operate on a global data-set.

Goal

Make it possible for the bot to handle multiple groups / conversations. Each group completely independent with own set of suppliers (restaurants) and orders.

Solution

The most straightforward solution is to use ConversationId value that is passed with every message sent to the bot to identify the group.

All data needs to be scoped to a particular group. Commands should retrieve data with the appropriate group filter applied.

Things to consider

  • Users - global or local to a group
    • consider introducing the concept of a group participant. User (global user) can belong to multiple groups.
  • Group management / administration
    • it's likely that there will be groups specific settings introduced such as: group preferred language, timezone, etc. How are these going to be set, who has permission?
  • Groups vs conversations
    • Is there 1 to 1 mapping between Skype conversations and groups? Could you have multiple conversations part of the same group? Should you be able to direct message the bot - which group to use in case user belongs to many groups?
      • For phase 1 assume 1 to 1 mapping.
  • Terminology
    • Decide on the terminology: groups / spaces / tenants ?

Add multi-language support

Goal

  • Should be able to accept localized versions of commands e.g. #help, #pomoc
  • Should be able to send localized responses

Things to consider

  • Language setting
    • per user
      • Does bot framework provide any means of determining user preferred language?
    • per conversation/group? (See #4)
    • per instance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.