Skip to content

Latest commit

 

History

History
69 lines (44 loc) · 3.98 KB

README.md

File metadata and controls

69 lines (44 loc) · 3.98 KB

odo Application Server (odoas)

UNFINISHED - While the underlying server and infrastructure has been used for years in production on multiple applications, odoas is a port that is being built as a general-purpose solution. At this time the server should not be considered finished.

odoas is built to be a flexible and scalable WebSocket Server that can be used in a variety of ways to provide horizontally scalable realtime data to clients. At its core, odoas uses pm2, uws, ioredis, and pubchan to provide an architecture which can be seamlessly scaled across multiple processors (or systems).

Reliability is a critical component of odoas. We utilize pm2, a powerful Node.js Process Manager to scale and maintain each of the apps. Combined with keymetrics dashboard, this provides a powerful capability for monitoring, controlling, and maintaining the entire infrastructure.

Out of the box, odoas provides metric reporting, extensibility via "apps", WebSocket Client Subscriptions / Channels (pubchan), and much more. It has been proven in applications serving tens of thousands of persistent clients across multiple applications.

Example Applications

  • Realtime Financial Chart Data (TradingView)
  • Realtime API Updates
  • Realtime Communication / Chat

Technologies

  • pm2 - Advanced, production process manager for Node.js
  • UWebSocket - Blazing fast WebSocket and HTTP implementation for clients and servers. Simple, efficient, and lightweight.
  • Redis - An in-memory data structure store, used as a database, cache and message broker. Specifically utilizing the lightweight "pubsub" mechanisms provided.
  • PubChan - A lightweight, powerful, and flexible Node.js pubsub broker for in-app subscription and channel management.
  • nvm - Node Version Manager is used to reliably maintain the Node.js environment that will run various parts of the application.
  • Serverless Framework - Wherever possible, we utilize FaaS platforms.

Flow Type Coverage

This project aims to be as close to 100% type coverage as possible. Unfortunately, there are certain things (try/catch blocks) that can not be type covered "properly". It has 98% at the time of writing this.

Frequently Asked Questions

  • Do all my Applications need to be Node.js?

Nope! pm2 is capable of managing many types of applications, not just Node.js.

Setup & Configuration

More Information Coming Soon...

cd $HOME
git clone https://github.com/odo-network/odoas .odoas
cd .odoas
yarn
yarn build:prod
yarn start:prod

Deployment

odoas is meant to be run within a 3-stage setup.

  • production - Your production server clients will connect with.
  • staging - A clone of your production server to test before final rollout (and possibly implement A/B Testing/Canary rollouts with).
  • test - A test environment which should model your production/staging environments as closely as possible.
yarn deploy:${ODOAS_STAGE}

If configured appropriately, the command above should handle the deployment, build, and running of your application. It will push changes to your server for you and restart it so you don't have to.

Your application will be gracefully updated if possible so that your users do not experience any downtime.

Adding Applications

odoas is meant to be a lightweight boilerplate for your Realtime Application's backend infrastructure. It is the interface from your UI layer to your backend layer and can be extended to meet nearly any infrastructure required.

More Details Coming Soon...