Restructure repository

* Move /common/src to /src
* Move services to net.psforever package
* Move /pslogin to /server
This commit is contained in:
Jakob Gillich 2020-08-23 03:26:06 +02:00
parent 89a30ae6f6
commit f4fd78fc5d
958 changed files with 527 additions and 725 deletions

View file

@ -0,0 +1,252 @@
akka {
loggers = ["akka.event.slf4j.Slf4jLogger"]
loglevel = INFO
logging-filter = akka.event.slf4j.Slf4jLoggingFilter
}
akka.actor.deployment {
"/login-udp-endpoint" {
dispatcher = network-listener
}
"/login-udp-endpoint/login-session-router" {
dispatcher = login-session-router
}
"/login-udp-endpoint/login-session-router/*" {
dispatcher = login-session
}
# Extremely performance critical (dedicated thread)
"/world-udp-endpoint" {
dispatcher = network-listener
}
# Extremely performance critical (dedicated thread)
"/world-udp-endpoint/world-session-router" {
dispatcher = world-session-router
}
# Most likely to crash (isolate)
"/world-udp-endpoint/world-session-router/*" {
dispatcher = world-session
}
# Service dedicated pool
"/service" {
dispatcher = service-dispatcher
}
"/service/*" {
dispatcher = service-dispatcher
}
# Bottleneck (dedicated thread)
"/service/galaxy" {
dispatcher = galaxy-service
}
# Isolate tasks
"/service/taskResolver*" {
dispatcher = task-dispatcher
}
# Bottleneck (dedicated thread)
"/service/cluster" {
dispatcher = interstellar-cluster-service
}
# Zone actors (lots of messages)
"/service/cluster/c1-actor" {
dispatcher = c1-zone-dispatcher
}
"/service/cluster/c1-actor/*" {
dispatcher = c1-zone-dispatcher
}
"/service/cluster/c2-actor" {
dispatcher = c2-zone-dispatcher
}
"/service/cluster/c2-actor/*" {
dispatcher = c2-zone-dispatcher
}
"/service/cluster/c3-actor" {
dispatcher = c3-zone-dispatcher
}
"/service/cluster/c3-actor/*" {
dispatcher = c3-zone-dispatcher
}
"/service/cluster/c4-actor" {
dispatcher = c4-zone-dispatcher
}
"/service/cluster/c4-actor/*" {
dispatcher = c4-zone-dispatcher
}
"/service/cluster/c5-actor" {
dispatcher = c5-zone-dispatcher
}
"/service/cluster/c5-actor/*" {
dispatcher = c5-zone-dispatcher
}
"/service/cluster/c6-actor" {
dispatcher = c6-zone-dispatcher
}
"/service/cluster/c6-actor/*" {
dispatcher = c6-zone-dispatcher
}
"/service/cluster/i1-actor" {
dispatcher = i1-zone-dispatcher
}
"/service/cluster/i1-actor/*" {
dispatcher = i1-zone-dispatcher
}
"/service/cluster/i2-actor" {
dispatcher = i2-zone-dispatcher
}
"/service/cluster/i2-actor/*" {
dispatcher = i2-zone-dispatcher
}
"/service/cluster/i3-actor" {
dispatcher = i3-zone-dispatcher
}
"/service/cluster/i3-actor/*" {
dispatcher = i3-zone-dispatcher
}
"/service/cluster/i4-actor" {
dispatcher = i4-zone-dispatcher
}
"/service/cluster/i4-actor/*" {
dispatcher = i4-zone-dispatcher
}
"/service/cluster/z1-actor" {
dispatcher = z1-zone-dispatcher
}
"/service/cluster/z1-actor/*" {
dispatcher = z1-zone-dispatcher
}
"/service/cluster/z2-actor" {
dispatcher = z2-zone-dispatcher
}
"/service/cluster/z2-actor/*" {
dispatcher = z2-zone-dispatcher
}
"/service/cluster/z3-actor" {
dispatcher = z3-zone-dispatcher
}
"/service/cluster/z3-actor/*" {
dispatcher = z3-zone-dispatcher
}
"/service/cluster/z4-actor" {
dispatcher = z4-zone-dispatcher
}
"/service/cluster/z4-actor/*" {
dispatcher = z4-zone-dispatcher
}
"/service/cluster/z5-actor" {
dispatcher = z5-zone-dispatcher
}
"/service/cluster/z5-actor/*" {
dispatcher = z5-zone-dispatcher
}
"/service/cluster/z6-actor" {
dispatcher = z6-zone-dispatcher
}
"/service/cluster/z6-actor/*" {
dispatcher = z6-zone-dispatcher
}
"/service/cluster/z7-actor" {
dispatcher = z7-zone-dispatcher
}
"/service/cluster/z7-actor/*" {
dispatcher = z7-zone-dispatcher
}
"/service/cluster/z8-actor" {
dispatcher = z8-zone-dispatcher
}
"/service/cluster/z8-actor/*" {
dispatcher = z8-zone-dispatcher
}
"/service/cluster/z9-actor" {
dispatcher = z9-zone-dispatcher
}
"/service/cluster/z9-actor/*" {
dispatcher = z9-zone-dispatcher
}
"/service/cluster/z10-actor" {
dispatcher = z10-zone-dispatcher
}
"/service/cluster/z10-actor/*" {
dispatcher = z10-zone-dispatcher
}
"/service/cluster/home1-actor" {
dispatcher = home1-zone-dispatcher
}
"/service/cluster/home1-actor/*" {
dispatcher = home1-zone-dispatcher
}
"/service/cluster/home2-actor" {
dispatcher = home2-zone-dispatcher
}
"/service/cluster/home2-actor/*" {
dispatcher = home2-zone-dispatcher
}
"/service/cluster/home3-actor" {
dispatcher = home3-zone-dispatcher
}
"/service/cluster/home3-actor/*" {
dispatcher = home3-zone-dispatcher
}
"/service/cluster/tzconc-actor" {
dispatcher = tzconc-zone-dispatcher
}
"/service/cluster/tzconc-actor/*" {
dispatcher = tzconc-zone-dispatcher
}
"/service/cluster/tzcotr-actor" {
dispatcher = tzcotr-zone-dispatcher
}
"/service/cluster/tzcotr-actor/*" {
dispatcher = tzcotr-zone-dispatcher
}
"/service/cluster/tzcovs-actor" {
dispatcher = tzcovs-zone-dispatcher
}
"/service/cluster/tzcovs-actor/*" {
dispatcher = tzcovs-zone-dispatcher
}
"/service/cluster/tzdrnc-actor" {
dispatcher = tzdrnc-zone-dispatcher
}
"/service/cluster/tzdrnc-actor/*" {
dispatcher = tzdrnc-zone-dispatcher
}
"/service/cluster/tzdrvs-actor" {
dispatcher = tzdrvs-zone-dispatcher
}
"/service/cluster/tzdrvs-actor/*" {
dispatcher = tzdrvs-zone-dispatcher
}
"/service/cluster/tzsdrtr-actor" {
dispatcher = tzsdrtr-zone-dispatcher
}
"/service/cluster/tzsdrtr-actor/*" {
dispatcher = tzsdrtr-zone-dispatcher
}
"/service/cluster/tzshnc-actor" {
dispatcher = tzshnc-zone-dispatcher
}
"/service/cluster/tzshnc-actor/*" {
dispatcher = tzshnc-zone-dispatcher
}
"/service/cluster/tzshtr-actor" {
dispatcher = tzshtr-zone-dispatcher
}
"/service/cluster/tzshtr-actor/*" {
dispatcher = tzshtr-zone-dispatcher
}
"/service/cluster/tzshvs-actor" {
dispatcher = tzshvs-zone-dispatcher
}
"/service/cluster/tzshvs-actor/*" {
dispatcher = tzshvs-zone-dispatcher
}
}

View file

@ -0,0 +1,131 @@
# The socket bind address for all net.psforever.services except admin. 127.0.0.1 is the
# default for local testing, for public servers use 0.0.0.0 instead.
bind = 127.0.0.1
# The public host name or IP address. Used to forward clients from the login
# server to the world server. The default value will only allow local connections.
public = 127.0.0.1
# Login server configuration
login {
# UDP listening port
port = 51000
# Account usernames that don't exist yet will be automatically created in the
# database. Useful for test servers and development testing.
create-missing-accounts = yes
}
# World server configuration
world {
# UDP listening port
port = 51001
# The name of the server as displayed in the server browser.
server-name = PSForever
# How the server is displayed in the server browser.
# One of: released beta development
server-type = released
}
# Admin API configuration
admin {
# TCP listening port
port = 51002
# The socket bind address
bind = 127.0.0.1
}
# Database configuration
database {
# The hostname of the PostgreSQL server.
host = localhost
# The TCP port to connect to the database with.
port = 5432
# The username to connect to the SQL server with.
username = psforever
# The password to connect to the SQL server with.
password = psforever
# The database name to use on the SQL server.
database = psforever
# The SSL configuration of the database connection.
# One of: disable prefer require verify-full
sslmode = prefer
# The maximum number of active connections.
maxActiveConnections = 5
}
# Enable non-standard game properties
game {
# Allow instant action to AMS
instant-action-ams = no
}
anti-cheat {
# The distance (squared) threshold that triggers if the reported hit location
# of a shot does not match the object being hit's location on the server
# One of 1-1000000 (sqrt 10000 = ~100 ingame units)
hit-position-discrepancy-threshold = 10000
}
network {
session {
# The maximum amount of time since the last inbound packet from a UDP session
# before it is dropped.
inbound-grace-time = 1 minute
# The maximum amount of time since the last outbound packet for a UDP session
# before it is dropped. Can be used as a watchdog for hung server sessions.
outbound-grace-time = 1 minute
}
}
developer {
net-sim {
# Enable artificial packet unreliability. Used for development testing.
# Active equally on upstream and downstream packets.
enable = no
# The percentage of outgoing and incoming packets that are dropped.
loss = 0.02
# The time a packet is buffered before being delivered to simulate delay.
# The artificial delay is in addition to any real network latency.
delay = 150 milliseconds
# The percentage chance that a packet will be ordered randomly in the delay
# buffer. If the delay is too small then packets won't be reordered.
reorder-chance = 0.005
# If a packet is reordered, the maximum time in the future or the past where
# it will randomly appear.
reorder-time = 150 milliseconds
}
}
kamon {
# Enables reporting of metrics to Kamon.io
enable = no
environment.service = "PSForever"
apm.api-key = ""
}
sentry {
# Enables submission of warnings and errors to Sentry
enable = no
# Sentry DSN (Data Source Name)
dsn = ""
}
include "akka.conf"
include "dispatchers.conf"

View file

@ -0,0 +1,506 @@
login-session {
# Dispatcher is the name of the event-based dispatcher
type = Dispatcher
# What kind of ExecutionService to use
executor = "fork-join-executor"
# Configuration for the fork join pool
fork-join-executor {
# Min number of threads to cap factor-based parallelism number to
parallelism-min = 8
# Parallelism (threads) ... ceil(available processors * factor)
parallelism-factor = 2.0
# Max number of threads to cap factor-based parallelism number to
parallelism-max = 64
}
# Throughput defines the maximum number of messages to be
# processed per actor before the thread jumps to the next actor.
# Set to 1 for as fair as possible.
throughput = 50
throughput-deadline-time = 20ms
}
world-session {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
parallelism-min = 8
parallelism-factor = 2.0
parallelism-max = 64
}
throughput = 50
throughput-deadline-time = 50ms
}
login-session-router {
executor = "thread-pool-executor"
type = PinnedDispatcher
}
world-session-router {
executor = "thread-pool-executor"
type = PinnedDispatcher
}
network-listener {
executor = "thread-pool-executor"
type = PinnedDispatcher
}
interstellar-cluster-service {
executor = "thread-pool-executor"
type = PinnedDispatcher
}
galaxy-service {
executor = "thread-pool-executor"
type = PinnedDispatcher
}
task-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
parallelism-min = 2
parallelism-factor = 2.0
parallelism-max = 64
}
throughput = 50
throughput-deadline-time = 50ms
}
service-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
parallelism-min = 2
parallelism-factor = 2.0
parallelism-max = 64
}
throughput = 50
throughput-deadline-time = 50ms
}
c1-zone-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
parallelism-min = 1
parallelism-factor = 2.0
parallelism-max = 4
}
throughput = 50
throughput-deadline-time = 50ms
}
c2-zone-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
parallelism-min = 1
parallelism-factor = 2.0
parallelism-max = 4
}
throughput = 50
throughput-deadline-time = 50ms
}
c3-zone-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
parallelism-min = 1
parallelism-factor = 2.0
parallelism-max = 4
}
throughput = 50
throughput-deadline-time = 50ms
}
c4-zone-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
parallelism-min = 1
parallelism-factor = 2.0
parallelism-max = 4
}
throughput = 50
throughput-deadline-time = 50ms
}
c5-zone-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
parallelism-min = 1
parallelism-factor = 2.0
parallelism-max = 4
}
throughput = 50
throughput-deadline-time = 50ms
}
c6-zone-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
parallelism-min = 1
parallelism-factor = 2.0
parallelism-max = 4
}
throughput = 50
throughput-deadline-time = 50ms
}
i1-zone-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
parallelism-min = 1
parallelism-factor = 2.0
parallelism-max = 4
}
throughput = 50
throughput-deadline-time = 50ms
}
i2-zone-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
parallelism-min = 1
parallelism-factor = 2.0
parallelism-max = 4
}
throughput = 50
throughput-deadline-time = 50ms
}
i3-zone-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
parallelism-min = 1
parallelism-factor = 2.0
parallelism-max = 4
}
throughput = 50
throughput-deadline-time = 50ms
}
i4-zone-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
parallelism-min = 1
parallelism-factor = 2.0
parallelism-max = 4
}
throughput = 50
throughput-deadline-time = 50ms
}
z1-zone-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
parallelism-min = 1
parallelism-factor = 2.0
parallelism-max = 4
}
throughput = 50
throughput-deadline-time = 50ms
}
z2-zone-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
parallelism-min = 1
parallelism-factor = 2.0
parallelism-max = 4
}
throughput = 50
throughput-deadline-time = 50ms
}
z3-zone-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
parallelism-min = 1
parallelism-factor = 2.0
parallelism-max = 4
}
throughput = 50
throughput-deadline-time = 50ms
}
z4-zone-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
parallelism-min = 1
parallelism-factor = 2.0
parallelism-max = 4
}
throughput = 50
throughput-deadline-time = 50ms
}
z5-zone-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
parallelism-min = 1
parallelism-factor = 2.0
parallelism-max = 4
}
throughput = 50
throughput-deadline-time = 50ms
}
z6-zone-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
parallelism-min = 1
parallelism-factor = 2.0
parallelism-max = 4
}
throughput = 50
throughput-deadline-time = 50ms
}
z7-zone-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
parallelism-min = 1
parallelism-factor = 2.0
parallelism-max = 4
}
throughput = 50
throughput-deadline-time = 50ms
}
z8-zone-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
parallelism-min = 1
parallelism-factor = 2.0
parallelism-max = 4
}
throughput = 50
throughput-deadline-time = 50ms
}
z9-zone-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
parallelism-min = 1
parallelism-factor = 2.0
parallelism-max = 4
}
throughput = 50
throughput-deadline-time = 50ms
}
z10-zone-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
parallelism-min = 1
parallelism-factor = 2.0
parallelism-max = 4
}
throughput = 50
throughput-deadline-time = 50ms
}
home1-zone-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
parallelism-min = 1
parallelism-factor = 2.0
parallelism-max = 4
}
throughput = 50
throughput-deadline-time = 50ms
}
home2-zone-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
parallelism-min = 1
parallelism-factor = 2.0
parallelism-max = 4
}
throughput = 50
throughput-deadline-time = 50ms
}
home3-zone-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
parallelism-min = 1
parallelism-factor = 2.0
parallelism-max = 4
}
throughput = 50
throughput-deadline-time = 50ms
}
tzconc-zone-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
parallelism-min = 1
parallelism-factor = 2.0
parallelism-max = 4
}
throughput = 50
throughput-deadline-time = 50ms
}
tzcotr-zone-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
parallelism-min = 1
parallelism-factor = 2.0
parallelism-max = 4
}
throughput = 50
throughput-deadline-time = 50ms
}
tzcovs-zone-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
parallelism-min = 1
parallelism-factor = 2.0
parallelism-max = 4
}
throughput = 50
throughput-deadline-time = 50ms
}
tzdrnc-zone-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
parallelism-min = 1
parallelism-factor = 2.0
parallelism-max = 4
}
throughput = 50
throughput-deadline-time = 50ms
}
tzdrvs-zone-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
parallelism-min = 1
parallelism-factor = 2.0
parallelism-max = 4
}
throughput = 50
throughput-deadline-time = 50ms
}
tzsdrtr-zone-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
parallelism-min = 1
parallelism-factor = 2.0
parallelism-max = 4
}
throughput = 50
throughput-deadline-time = 50ms
}
tzshnc-zone-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
parallelism-min = 1
parallelism-factor = 2.0
parallelism-max = 4
}
throughput = 50
throughput-deadline-time = 50ms
}
tzshtr-zone-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
parallelism-min = 1
parallelism-factor = 2.0
parallelism-max = 4
}
throughput = 50
throughput-deadline-time = 50ms
}
tzshvs-zone-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
parallelism-min = 1
parallelism-factor = 2.0
parallelism-max = 4
}
throughput = 50
throughput-deadline-time = 50ms
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff