-
Notifications
You must be signed in to change notification settings - Fork 1
/
TODO
34 lines (31 loc) · 2.12 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
- Implement NAT hole punching.
- Arbitrary metadata blob attached to servers.
- Errors should be defined at the same level, for ex strings should all be
written in "controllers.go", and should not trust error messages from deeper
layers. However, those messages could be logged?
- Sessions should be persistent so the master server can be restarted
and clients dont get 403s.
Authentication requirements/research:
- Should be generally hard to LIST/CREATE/SPAWN
- https + game ID may be sufficient here
- However HTTPs has the problem of client intercepting proxies. But this
can also be circumvented to some degree by using Certificate Pinning
- Only the owner of a server should be able to UPDATE/DELETE/PING since that would
be the primary abuse vector.
- Simple solution is an /identify endpoint which is like /login but without u/p, it just
generates and provides a unique session token for managing resources.
Game server hosting models which hotel can support:
- Persistent client-server
- A static or dynamic number of game servers are hosted server side (facilitated by the spawner)
and are registered with the master server. Clients connect with these servers by discovering
them via the master server. No NAT issues are necessary since hotel will ensure the game servers
have public connectable ports.
- Client initiated: Peer-to-peer
- Clients create game servers and register them with the master server. Other clients can
connect directly with these servers by discovering them via the master server. The master
server can additionally assist with NAT hole-punching to establish the initial connection.
- Client initiated: Client-server
- Clients create game servers by requesting that one be spawned for them server side. The request
is sent through the master server which RPCs to the spawner to spin up a new instance.
Docker stuff:
- Go object cache for faster builds: https://medium.com/windmill-engineering/tips-tricks-for-making-your-golang-container-builds-10x-faster-4cc618a43827