Updated Project Architecture (markdown)

Risto Lahtela 2019-10-31 13:28:02 +02:00
parent 3653353ac5
commit db592b1d74
1 changed files with 48 additions and 0 deletions

@ -63,4 +63,52 @@ This is the main mechanism used for instantiating different system level objects
# Structure outline of `common`-module
## Lifetime
The process begins in a platform specific module by creating a new Dagger `Component` that resolves all dependencies for `PlanSystem`.
- When the plugin is enabled by the platform it is running on `PlanSystem#enable` is called, which will lead to all subsystems getting started in a specific order.
- When the platform is shutting down and the plugin is disabled `PlanSystem#disable` is called, which stops all extra threads and closes resources the plugin is using.
- When the plugin is reloaded with `plan reload` command by user, first the plugin is disabled and then enabled. A new Dagger component is created in the process, so `PlanSystem` instance is new each time the process enables.
## Package structure
> Packages were restructured during 5.0 update and some classes might still be in *odd* locations (`TaskSystem` for example).
Below are *packages* that are in package `common/src/java/com.djrapitops.plan`
Package | Role
-- | --
`api` | Plan API v4. Deprecated.
`capability` | Capability Service implementation (APIv5)
`commands` | Implementation for commands (`plan`, `planbungee`/`planvelocity`)
`data` | Contains deprecated APIv4 data classes.
`delivery` | Output related packages
`delivery.domain` | Data objects related to delivering web content & doing analysis
`delivery.export` | Export System and its utilities, for exporting html and json files
`delivery.formatting` | Formatting utilities (some use settings)
`delivery.rendering` | Utilities for parsing html and json
`delivery.webserver` | WebServer implementation & Request resolving
`exceptions` | Exceptions used around the plugin
`extension` | Implementation for DataExtension API (APIv5)
`gathering` | Input related packages
`gathering.afk` | AFK Tracking
`gathering.cache` | Caches for gathered data like Sessions
`gathering.domain` | Data objects related to gathered data
`gathering.importing` | Import system
`gathering.listeners` | Basis for event listeners (mostly platform based)
`gathering.timed` | Timed tasks related to data gathering
`identification` | Identification of current server and UUID utilities
`modules` | Dagger related dependency resolution classes
`processing` | Extra execution service for async processing
`query` | Implementation for Query API (APIv5)
`settings` | Everything that user can configure (Config, Locale, Theme)
`storage` | Database & resource (file/jar) management
`storage.database.queries | SQL queries for the database
`storage.database.transactions` | Transactions for the database
`utilities` | Bunch of random utilities
`version` | System that checks for new version
# About Platform APIs
*Under construction*