Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/14f3v/smad-backend-services
The show case of a real-time application using a protocol like websocket/http2/quic scale by using redus pub/sub
https://github.com/14f3v/smad-backend-services
bun express nodejs redis scalability socket-io socketio typescript websocket
Last synced: 1 day ago
JSON representation
The show case of a real-time application using a protocol like websocket/http2/quic scale by using redus pub/sub
- Host: GitHub
- URL: https://github.com/14f3v/smad-backend-services
- Owner: 14f3v
- License: mit
- Created: 2024-02-19T03:05:00.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-03-03T14:45:26.000Z (10 months ago)
- Last Synced: 2024-10-04T23:21:06.152Z (3 months ago)
- Topics: bun, express, nodejs, redis, scalability, socket-io, socketio, typescript, websocket
- Language: TypeScript
- Homepage:
- Size: 175 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# A Showcase of Scalability Multiplexing Application Design Approach
This project serves as a showcase for building scalable real-time applications using modern technologies. The serverside application is powered by bun.sh runtime and Socket.IO for efficient real-time communication. Redis is integrated to manage connection pools, enabling the system to handle millions of concurrent connections## Articles
you can reach out a full articles in article directory
- [Scalability Multiplexing Application Design Approach](https://github.com/14f3v/SMAD-backend-services/blob/main/articles/EN_Multiplexing_System_Architecture_Scalability.md)## Start project
clone git repository and cd to the main project directory and install dependenciesincase of using [bun.sh](https://bun.sh)
```bash
cd SMAD-backend-services
bun install
```incase of using [npm]([https://npm.sh](https://www.npmjs.com))
```bash
cd SMAD-backend-services
npm install
```incase of using [yarn]([[https://npm.sh](https://www.npmjs.com](https://yarnpkg.com)))
```bash
cd SMAD-backend-services
yarn
```### Start sevrer application
There are so many condition to start a server application like run dry mode, run watch mode, run docker with watch mode and mount volumes. for example.if you would like to start server application as a dry mode, you can use
```bash
bun run --b index.ts
```if you would like to start server application as a watch mode, you can use
```bash
bun run --watch --b index.ts
```
or you can use
```bash
bun run start:watch
```
to run multiple replicas server side application container as a watch mode **depends on your code changed**. you can use a command-line
```bash
bun run docker:start:live
```To run a minion from server-side to simulate and understanding a flow of concept, you can use a command-line to run
```bash
bun run start:watch:client
```
and similar concept of spawning a multiple minion, you can use docker-compose to replicate a container base on a project director volumes mount. you can use a command-line
```bash
bun run spawn:client
```
- facts: in default spawnclient.compose.live.yml config file setting a replicas of docker container at 3. you can scale a container instance out whenever you need. for example command-line
- ```bash
docker-compose -f spawnclient.compose.live.yml scale client-minion=10
```