Giter VIP home page Giter VIP logo

Comments (4)

lafreak avatar lafreak commented on May 5, 2024

Regularly save player's properties to database (10min? 30min?)

from noahgameframe.

ketoo avatar ketoo commented on May 5, 2024

@lafreak It's a way to do this, the disadvantage is that it will lose the data if the process crashed. In my experience, using the share memory object management to manage the player's properties which you want to store that would be better, based on this, it would don't lose any data once the process crashed. Move over we can use another process to save the player's data by order.

In NF world, just need to replace the data of the class "Property" by share memory object can reach the goal.

from noahgameframe.

H1X4Dev avatar H1X4Dev commented on May 5, 2024

There are 3 possible approaches for this topic:

  • Flush player data to database every 15 minutes.
  • Always flush player data to database whenever requested or used.
  • Create a crash capturing system so it would save the data of the player before crash ether;
    • Save player data to the database
    • Save player data into a file if database is unavailable during this time and then when the app starts, it would load the saved data from the file and flush it to database before server starts.

I think using an external application for managing the data ("share memory object management to manage the player's properties") would be exactly the same as just pushing data into the database immediately.

from noahgameframe.

ketoo avatar ketoo commented on May 5, 2024

@H1X4Dev Great sum. Most of the time people flush player data to the database every 5 minutes or 15 minutes, this solution easy to implement and just only lose 5 or 15 minutes data once the app crashed.

The solution always flushes player data to the database whenever requested or used is great but too expensive, as the result, I want to use an external application for managing the data to reduce the workload of the database.

from noahgameframe.

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.