Skip to content

oguzhan18/micro-socket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Micro Socket

A microservice-like paradigm for real-time communication at global scale.

Micro Socket brings the microservice mindset to WebSockets and real-time systems: one sub-socket (subscription group) per topic, scalable to millions of broadcasts, with clear invariants (ACL, dedup, ordering, resume) and a single protocol across gateways.

GitHub


What's in this repo

  • Documentation — Methodology, sub-socket model, invariants (I₁–I₇), algorithms, architecture, and code examples (EN / TR / ES). Built with VitePress.

Core ideas (from the docs)

Concept Description
Sub-socket One logical subscription group per topic. Scale unit = number of sub-sockets, not raw connections.
Main + sub One “main” feed (e.g. raw prices); many “sub” streams (e.g. same feed + margin per channel). Different clients get different views.
Invariants (I₁–I₇) No unauthorized access (ACL), no double processing (dedup), ordering (seqNo), delivery guarantee, latency SLO, resume after disconnect, data integrity.
Protocol Setup → Subscribe → Message/Ack; optional Publish with messageId (dedup), Resume with sessionId + lastSeq.

Quick start (documentation)

npm install
npm run docs:dev

Open http://localhost:5173. Use the sidebar for methodology, algorithms, and examples. Languages: English (default), Türkçe, Español.

Command Description
npm run docs:dev Dev server (localhost:5173)
npm run docs:build Production build
npm run docs:preview Preview production build

Documentation structure (summary)

  • Methodology — What Micro Socket is, principles, global problems and solutions.
  • Sub-Socket Model — Server/client sub-sockets, data structures, broadcast flow.
  • Invariants — I₁ (ACL) through I₇ (integrity).
  • Algorithms — Master flow, dedup, ACL, ordering, resume; Mermaid diagrams.
  • Architecture — High-level diagrams, data flow, scaling.
  • Examples — Elysia gateway, price-feed gateway, Node.js gateway/client/backbone, E2E.
  • Test & Fintech — Test matrix, metrics, fintech use cases.

Full navigation and details are on the documentation site (run locally with the commands above or use the deployed site if you have one).


Links


License

See the repository for license information.

About

Micro Socket brings the microservice mindset to WebSockets and real-time systems: one sub-socket (subscription group) per topic, scalable to millions of broadcasts, with clear invariants (ACL, dedup, ordering, resume) and a single protocol across gateways.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors