BigPharmaceutical / chessehc

0 stars 0 forks source link

Design an interface between the client and server #1

Open tomBoddaert opened 1 year ago

tomBoddaert commented 1 year ago

Tracking issue - client, server interface

Initial issue: requirements and initial ideas Interface specification: (WIP)

tomBoddaert commented 1 year ago

Initial issue: requirements and ideas

What we need from the underlying protocol: - Two-way communication - Keep-alive Underlying protocol options: - Raw TCP socket - Lightweight - WebSocket / HTTP ✅ - Allows us to create browser-based clients, as the [TCP and UDP Socket API](https://www.w3.org/TR/raw-sockets/) for the browser is still experimental and not well supported - GraphQL with Subscriptions Format: - Custom binary format ✅ - Lightweight - JSON - Easier to build clients in languages where raw bit manipulation is difficult / infrequently used - GraphQL (with the GraphQL protocol) What requests need sending and what response should they have? - Game create (HTTP) - Game id - Game join (HTTP with upgrade) - update to all - Get valid moves of a piece - valid moves - Validate move - boolean - Make move - deltas to all - Get board and pieces - board and pieces - Leave game - update to all - Account information (HTTP) Login system: - Key-based auth ✅ - External system (e.g. Auth0 / Firebase)
tomBoddaert commented 1 year ago

Interface specification

The interface specification has been moved to /protocol_specification/.
Protocol Specification