cloud-game/web/js
sergystepanov 980a97a526
Handle no config situation for workers (#253)
(experimental feature)

Before a worker can start, it should have a configuration file. In case if such a file is not found it may request configuration from the coordinator to which it connected.

Added example logic if a worker is needed to be blocked until a successful packet exchange with a coordinator is being made.

* Add error return for config loader

* Add config loaded flag to worker

* Add zone flag

* Add a custom mutex lock with timout

* Refactor worker runtime

* Refactor internal api

* Extract monitoring server config

* Extract worker HTTP(S) server

* Add generic sub-server interface

* Add internal coordinator API

* Add internal routes and handlers to worker

* Add internal worker API

* Refactor worker run

* Migrate serverId call to new API

* Add packet handler to cws

* Extract handlers for internal worker routes in coordinator

* Pass worker to the worker internal heandlers

* Cleanup worker handlers in coordinator

* Add closeRoom packet handler to the API

* Add GetRoom packet handler to the API

* Add RegisterRoom packet handler to the API

* Add IceCandidate packet handler to the API (internal and browser)

* Add Heartbeat packet handler to the API (internal and browser)

* Rename worker routes init function

* Extract worker/coordinator internal ws handlers

* Update timed locker

* Allow sequential timed locks

* Add config request from workers

* Add nil check for the route registration functions
2021-01-03 21:23:55 +03:00
..
event Merge Pr/173 with master (#218) 2020-07-04 04:24:13 +08:00
gui Merge Pr/173 with master (#218) 2020-07-04 04:24:13 +08:00
input Merge conflict 2020-09-13 03:42:27 +08:00
lib Initial new frontend rewrite (#129) 2019-11-05 01:44:19 +07:00
network Handle no config situation for workers (#253) 2021-01-03 21:23:55 +03:00
settings Merge Pr/173 with master (#218) 2020-07-04 04:24:13 +08:00
stats Add frame delay or frame rate stats to stat view. (#206) 2020-06-26 02:39:39 +08:00
controller.js Fix game sharing (#240) 2020-10-19 21:26:32 +08:00
env.js Merge Pr/173 with master (#218) 2020-07-04 04:24:13 +08:00
gameList.js Initial new frontend rewrite (#129) 2019-11-05 01:44:19 +07:00
init.js Merge Pr/173 with master (#218) 2020-07-04 04:24:13 +08:00
log.js Merge Pr/173 with master (#218) 2020-07-04 04:24:13 +08:00
room.js Give option to join by zone + update README (#146) 2019-12-09 03:02:35 +08:00
utils.js Add anti-abuse debounce and throttle functions (#233) 2020-10-02 02:16:28 +08:00