Skip to content

Latest commit

 

History

History
111 lines (88 loc) · 3.37 KB

function_specifications.md

File metadata and controls

111 lines (88 loc) · 3.37 KB

#Software specifications

Major issue

Impossible to filter API on close_vote_count and close_flag_count, this force the need for a service that fills a database with question of interest

No information available if question is in review or is closed flag. This makes it impossible to include a reverse function, flag checking function, that could remove questions from review que if incorrectly flagged, by editing. Futhermore we can not link to the review interface (hence user need to vote from question page)

Software structure

Database Amazone RDS

Database is need to store questions with close votes/duplicate request and registrer user activity for statistics

Major tables

TODO: Define the correct database structure and relative columns

Users

id_user user_name acces_level

Questions

question_id creation_date title tag close_vote_count score view_count answer_count is_answer_accepted is_possible_duplicate id_user_ignore

Batch served

user_id batch_nr question_id batch_date_start cv_count_before batch_date_end cv_count_after is_closed

Database fill service (since no filtering in api)

Rough numbers: monitor 40 high traffic tags with 1000 question x day each tag.

The service will execute similar API call: https://api.stackexchange.com/docs/questions#page=4&pagesize=100&fromdate=2016-05-04&todate=2016-05-05&order=desc&sort=activity&tagged=ios&filter=!)5IW.LolAne7)nV0)jqvenrWbHDZ&site=stackoverflow&run=true

Fill the database with selected questions and then monitor with predefined strategy the questions.

To find possible duplicates use comments example

"comments": [ { "score": 0, "comment_id": 61589692, "body": "I found the answer here. Adding it to the window solved my problem." }, { "score": 1, "comment_id": 61590323, "body": "Possible duplicate of Add a UIView above all, even the navigation bar" } ],

A test application is under development here SOCVDBService

BOT Function

Notification

Monitor database for latest possible duplicate and notify user in relative room

Question search function

  1. On request query database on tag to get LIMIT 100 question_id with order as in request command
  2. Execute api request with question_id's (https://api.stackexchange.com/docs/questions/questionid1;questionId2) and filter as request
  3. Update batch table with user, room, batch number and questions
  4. Generate response file and respond with location to user
  5. On batch response command done execute api request with question ids and update batch table

Note: If tag is not supported by database, the api is queried for latest X questions based on activity date.