core icon indicating copy to clipboard operation
core copied to clipboard

Finalise Users/Profiles, Globals and Central Server Overhaul

Open 1ForeverHD opened this issue 4 years ago • 0 comments

Globals

  • [x] See test server and write up details

Central Server

  • [x] See test server

System User

  • [ ] CRITICAL: Strongly reconsider how Studio -> Server and Server -> Studio functions, or at least consider a Studio-only Lock permission/configuration that prevents an object (such as a role, ban, etc) being configured in game
    • [ ] The best course of action may be to apply locks to the 'Owner' and 'Manager' roles
    • [ ] Prevent this lock property from being configured by datastores
    • [ ] Ensure that locked roles always have a greater priority than equivalents
    • [ ] ALSO IMPORTANT: Introduce a studio setting (not an in-game setting) which *can only be modified in studio) that restricts global communications (default to global communications enabled).
  • [x] CONCEPTUALISE how a 'server user' with profilestore will work
    • [x] Does the user conform to the central server with data being sent over the network to it, or is memory store utilised to just 'hand over' who is in control of this user?
    • [x] Determine how global data can be read from non controlling servers if they can't directly access the profile
    • [x] How periodically are changed checked for, and what happens if their are both changes in the current records and incoming profile? How can these changes be merged without re-triggering signals?
    • [x] How is the server to host the session determined? Sorted maps (ascended by timestamps) or queues? Are all servers checking this queue, or just the central server which publishes its results via globals?
    • [x] How does the session handover occur? Should the lead server remove its queue position as soon as its save is complete, then have the next server (if any), forcefully take over that session? It's important that these handovers are at least 6 seconds apart to prevent exceeding Set Cooldown Limits.
    • [ ] Write up these changes into environments
    • [ ] Organise Environments so that only relevant information remains
  • [ ] Important: What happens if a role (such as the default owner role) is created before all data from an environment has loaded? What to do with the .loaded method within services?

Users/Profile

  • [x] User:view()
  • [x] UserStore:viewUser(key, version)
  • [x] UserStore:updateUser(key, stateChanges)
    • [x] stateChanges will be a table containing sub table description the action change (e.g. {{"insert", "Characters.Specials", "Ben10"}, {"set", "Cash", 999}}
    • [x] This will require first checking in the server, then if not successful invoking a global to check all other srevers, then finally loading the user manually.
    • [x] Once a user has been identified/loaded, apply the stateChanges
    • [x] If user was manually loaded, make sure to destroy it right-away after use
  • [ ] Update all user.perm and user.temp data to PascalCase

1ForeverHD avatar Feb 09 '22 12:02 1ForeverHD