Learn more about the Komodo Platform
The relay server facilitates client communication during multiplayer sessions. It allows clients to join session namespaces or 'rooms', propagates client updates (including positions within the VR scene and interactions with entities or other clients), coordinates chat sessions (including text and voice/video/screen) [1], maintains session state (including active clients, entity and scene state, session properties), and captures data during session recording.
You will need Node.js installed on your machine.
-
Clone this repository
git clone https://github.com/gelic-idealab/komodo-relay.git
cd komodo-relay/
-
Configure the Docker container
cp config.template.js config.js
- Edit config.js:
- db: connection information for
komodo-db
or a comparable MySQL server - azure: Microsoft Speech SDK credentials
- capture: local file directory for capture files
- db: connection information for
-
Install dependencies
npm install
-
Run the relay server
node serve.js
Dependencies (Production) | Usage |
---|---|
Microsoft Speech SDK [1] | Processing client audio for speech-to-text |
mkdirp | Creating directories for writing capture files |
mysql2 | Connecting to komodo-db for connection, capture records |
object.fromentries | Polyfill for turning a map into an object |
socket.io | Managing session namespaces, joining clients to sessions, listening for and emitting custom events (such as position updates), portal text & speech-to-text chat [1] |
winston | Logging |
Dependencies (Development) | Usage |
---|---|
Mocha | Unit testing |
Instanbul | Code coverage |
Should.JS | Easy-to-read assertions |
[1] NOTE: The chat namespace is experimental and not ready for production usage.
The test
directory contains scripts which use and validate relay functionality. Please run tests during development, and especially before submitting pull requests.
npm run test
OR
nyc mocha --debug-brk --exit
The recommended Komodo deployment uses Docker and docker-compose.