johnding1996 / HKUST-COMP3111H-Group

Group Project of COMP 3111H in Fall 2017 at HKUST
Apache License 2.0
0 stars 0 forks source link

Draw the architecture diagram based on previous meetings #17

Closed johnding1996 closed 6 years ago

johnding1996 commented 6 years ago
johnding1996 commented 6 years ago

From szhouan

  1. Data flow between Database and Controller needed when chatbot ask for users' weight everyday to get a list of all users
  2. LogJSON should have a better name since log is too ambiguous. Suggested StateTransitionLogJSON
  3. Use String for state identification for more comprehensible code and efficient debug
  4. No need to use StateJSON for logging, as it is done by LogJSON already
  5. Digest images for feedback should be stored somewhere on the server, maybe in Redis?
johnding1996 commented 6 years ago

From wguoaa: Architecture: 1.MenuInput:

Incoming link a. Data flow and control flow between TextParser and FoodRetriever: PartialFoodQuerier/FuzzyFoodQuerier b. data flow between IOInterface and MealAsker sub-module

Outgoing link a.data flow FoodRetriever to Redis Cache: need to store the mapping of actual dish name for output message of recommandation b. data flow between FoodCreater and PartialFoodQuerier/FuzzyFoodQuerier: add new dish to SQL table Food-Nutrition c. data flow between IOInterface and MealAsker sub-module

Other a. about SizeAsker: is it necessary in the MealAsker module? Only in the Recorder module may be enough, maybe we do not need user to input a size here. We could use the confirmed [FoodJSON] here and recommend the portion based on the food nutrition fact

2.Recorder:

Incoming link a. data flow from RecommendationPoster to MealRecorder: IOInterface for User Confirmation. Or maybe simplify this step and ignore the data flow line from RecommendationPoster to MealRecorder: only record the actual intake, ignore the recommendations b. data flow between IOInterface and MealAsker sub-module

Outgoing link a. data flow between IOInterface and MealAsker sub-module

Other

3.Miscellaneous:

Typos: SQL DB: Food-Nutrition Fuzzy Search Recommend: FoodNutritionRetriever UserInfoRetriever

johnding1996 commented 6 years ago

@thomaszhouan Thanks for your review. Here are some questions regarding your suggestions.

  1. What do you mean by "when chatbot ask for users' weight everyday to get a list of all users", do we need a full user list when asking the users's weight? Are we going to update users' weight daily?
  2. Well my intention on logging is ambiguous, I think we should have a separate logging function other than the state transition part. That is, this two concepts are different.
  3. Ok
  4. No StateJSON is just to manipulate the state kept in cache layer. Logging is another thing. We should keep StateJSON relatively simple.
  5. Good point, I will make the SerializeWrapper capable to do this.
johnding1996 commented 6 years ago

@WSGuo After a short discussion, all suggestions are clear to me. I've already updated the graph.

thomaszhouan commented 6 years ago

@johnding1996

  1. We do need to update users' weight daily, see here, the 2nd item. So controller needs a full user list to perform the task daily.
  2. I think the information necessary for logging is the JSON objects passing between different modules. In that case, the cache layer can simply keep a receiver for all those JSONs (see this link)
johnding1996 commented 6 years ago

@thomaszhouan

  1. Good point, I am wrong. So what is the purpose of fetching a list of all users' at the time of asking user's weight? Any good suggestions on how to implement this in our existing architecture?
  2. Good idea. My opinion is to log the messageJSON directly or its superset. And this will also be handled by EventAnalyzer right?
  3. How is your progress on bringing out MessageJSON standard? Please write a API Doc if you have time.
  4. And what's you idea on the Controller architecture, plz tell me and I'll update the complete graph. You can draw a simple diagram for me.
thomaszhouan commented 6 years ago

@johnding1996

  1. Add new function in UserQuerier for fetching a list of all userId. This is necessary for sending push message through LINE API.
  2. Logging the superset is OK.
  3. and 4. Working on now
johnding1996 commented 6 years ago

@thomaszhouan

  1. Good, I've already added that method and changed the diagram according to your suggestion.
johnding1996 commented 6 years ago

Closed since out-of-dated. The version of structural diagram is fixed until releasing milestone 2. Before that, no new official releasing of structural diagram will be published