@nexjs-ws
Introduction
We use websocket as an Inter program or module communication protocol. I develop a custom protocol over Websocket that implement this 2 Patterns
Request/Response Pattern
Publish/Subscribe Pattern
We can response to almost any problems in a effective way with a combination of this 2 patterns:
Synchronized calls
Notifications by Events
the idea
Separate in server the Functionality (Contract) from the call protocol and transport (Rest API, Websocket TCP IP, HTTP, ...) and create or update typed clients automatically. the main goals are
Alway typed (Client and Server)
Never implement a client
Any update generate errors in code
Separate functions (contracts) from transports and protocols. You van bind multiples protocols and transports on one server without code duplication.
Realtime Applications: the combination of Publish/Subscribe and Rest is required for an easy implementation.
Really simplified server code.
Authentication separated from functionality

Code overview
Only Implements the server
automatic client generation (ts or c#)
server
cli (typed api client creation)
client
Repositories
npm pakages
Dev repositories
Demo repositories
Repository name
Link
Description
Last updated
Was this helpful?