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

Implement 'Add items from user list to lesson queue' function #36

Open
ExitTrance opened this issue Mar 16, 2021 · 3 comments
Open

Implement 'Add items from user list to lesson queue' function #36

ExitTrance opened this issue Mar 16, 2021 · 3 comments
Assignees
Labels
High Priority Feature Features that are of high priority

Comments

@ExitTrance
Copy link
Owner

No description provided.

@ExitTrance ExitTrance added the High Priority Feature Features that are of high priority label Mar 16, 2021
@ExitTrance ExitTrance self-assigned this Mar 16, 2021
@ExitTrance ExitTrance added this to To-do in KanjiMaru To-do via automation Mar 16, 2021
@ExitTrance ExitTrance moved this from To-do to In progress in KanjiMaru To-do Mar 16, 2021
@ExitTrance
Copy link
Owner Author

ExitTrance commented Mar 18, 2021

Force Flutter to use a User setting which is then used to manually add lessons when the user wishes to do so via Quick Study or Learn mode.
Much easier to implement than a cloud function (which would not work offline), or a cron job/background service (alarm manager or something akin to this).

@ExitTrance
Copy link
Owner Author

Change the structure to force the user to have only one list that they are learning from at one time.

@ExitTrance
Copy link
Owner Author

ExitTrance commented Mar 19, 2021

After banging my head against the wall the past couple of days, I've come to a conclusion as to how to tackle the issue that came to light thanks in part to changing the Firestore structure in place, and trying to add this learn mode.

Previous 'thought' was to add all 1.3k~ vocab from the Book Genki 1 to Firestore as an initial test. This would incur a whooping 1.3k writes, and subsequent reads from a single user if it were to happen. On a larger scale, this would incur high costs. I am not happy with the thought that someone could abuse this.

Instead of the above, an addition of a 'premadeListsUsed' field inside the settings, and adding 'learned' vocab only to Firestore, would allow the system to store the premade list/s locally. This is because we can simply compare the list/s locally (the ones mentioned in 'premadeListsUsed') to the Firestore learned vocab to display the items with their respective status on the client.

The above (rather crude) explanation of the system would allow easy addition of new items simply based on items in the list which are not on Firestore, and local scheduling of items via a cron job (let's say one that is running every hour), while keeping reads and writes to a minimum. A more detailed breakdown should follow sometime soon.

In the case of user-made lists, all items would have to be stored on Firestore. To prevent a user from adding some arbitrary amount of items (let's say 1000), security rules need to be put in place.

Another thought would be the writing component. I'm thinking that it would be a good idea to let the user decide during the 'learning' part if they want to write the item or not (as that decision will be then persisted). Subsequent changes to learned items can then be made in the list on the client? Not sure yet as to how to tackle this particular problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
High Priority Feature Features that are of high priority
Projects
KanjiMaru To-do
  
In progress
Development

No branches or pull requests

1 participant