Giter Site home page Giter Site logo

Comments (3)

ExitTrance avatar ExitTrance commented on June 1, 2024

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).

from kanjimaru.

ExitTrance avatar ExitTrance commented on June 1, 2024

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

from kanjimaru.

ExitTrance avatar ExitTrance commented on June 1, 2024

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.

from kanjimaru.

Related Issues (20)

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.