Kiosks: Difference between revisions

From OuroDev
(Created page with "== Schema == cohdb.dbo.Stats Three basic columns: ContainerId / SubId: Unique primary key to add multiple rows per character Name: numeric ID of entry in vars.attribute The...")
 
Line 1: Line 1:
== Schema ==
==Schema==


cohdb.dbo.Stats
cohdb.dbo.Stats


Three basic columns:
Three basic columns:
ContainerId / SubId: Unique primary key to add multiple rows per character
 
Name: numeric ID of entry in vars.attribute
* ContainerId / SubId: Unique primary key to add multiple rows per character
 
* Name: numeric ID of entry in vars.attribute


The remaining columns follow this format, “Category_Period,” e.g. General_Today, Kills_ThisMonth, Time_ThisWeek.
The remaining columns follow this format, “Category_Period,” e.g. General_Today, Kills_ThisMonth, Time_ThisWeek.
Line 11: Line 13:
Actions and events in MapServer increment or add to these columns.
Actions and events in MapServer increment or add to these columns.


== Process ==
==Process==
 
=== DBServer ===
1. DBServer loads vars.attribute
 
2. Each var name is read into a global stashtable. The name are lowercased for case-insensitivity.
 
3. DBServer reads dbo.Stats and compiles a list of top ranks per unique Name in a valid time period.


4. DBServer broadcasts top ranks periodically to all connected MapServers.
===DBServer===


=== MapServer ===
# DBServer loads vars.attribute
1. MapServer registers stat tables based off villain groups, zones, and common names — does not read vars.attribute. Names must be lowercased during this registration function to match DBServer broadcasts.
# Each var name is read into a global stashtable. The name are lowercased for case-insensitivity.
# DBServer reads dbo.Stats and compiles a list of top ranks per unique Name in a valid time period.
# DBServer broadcasts top ranks periodically to all connected MapServers.


2. MapServer receives broadcasted stats and stores them in memory.
===MapServer===


3. MapServer records player statistics and flushes individual player’s updated stats to the database when the player is unloaded (zone transfer or logging out). DBServer reads the database and requires this data to be flushed to account for new stats.
# MapServer registers stat tables based off villain groups, zones, and common names — does not read vars.attribute. Names must be lowercased during this registration function to match DBServer broadcasts.
# MapServer receives broadcasted stats and stores them in memory.
# MapServer records player statistics and flushes individual player’s updated stats to the database when the player is unloaded (zone transfer or logging out). DBServer reads the database and requires this data to be flushed to account for new stats.
# If a client opens a relevant kiosk and topic, it generates HTML and sends it to the client. MapServer regenerates and sends new HTML each time a topic is loaded.


4. If a client opens a relevant kiosk and topic, it generates HTML and sends it to the client. MapServer regenerates and sends new HTML each time a topic is loaded.
===Client===


=== Client ===
# Client renders HTML in uiSMFView.
1. Client renders HTML in uiSMFView.

Revision as of 03:00, 30 May 2021

Schema

cohdb.dbo.Stats

Three basic columns:

  • ContainerId / SubId: Unique primary key to add multiple rows per character
  • Name: numeric ID of entry in vars.attribute

The remaining columns follow this format, “Category_Period,” e.g. General_Today, Kills_ThisMonth, Time_ThisWeek.

Actions and events in MapServer increment or add to these columns.

Process

DBServer

  1. DBServer loads vars.attribute
  2. Each var name is read into a global stashtable. The name are lowercased for case-insensitivity.
  3. DBServer reads dbo.Stats and compiles a list of top ranks per unique Name in a valid time period.
  4. DBServer broadcasts top ranks periodically to all connected MapServers.

MapServer

  1. MapServer registers stat tables based off villain groups, zones, and common names — does not read vars.attribute. Names must be lowercased during this registration function to match DBServer broadcasts.
  2. MapServer receives broadcasted stats and stores them in memory.
  3. MapServer records player statistics and flushes individual player’s updated stats to the database when the player is unloaded (zone transfer or logging out). DBServer reads the database and requires this data to be flushed to account for new stats.
  4. If a client opens a relevant kiosk and topic, it generates HTML and sends it to the client. MapServer regenerates and sends new HTML each time a topic is loaded.

Client

  1. Client renders HTML in uiSMFView.