Giter Site home page Giter Site logo

nanite-systems / stream Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 1004 KB

The Nanite Systems streaming services is a backwards-compatible ESS of PS2 Census ESS. It implements numerous fixes and present a more reliable event stream.

Home Page: https://nanite-systems.net

License: Apache License 2.0

JavaScript 3.26% Shell 0.09% Dockerfile 0.49% TypeScript 96.16%
eventstream planetside2 websocket

stream's Introduction

Description

The Nanite Systems streaming services is a backwards-compatible ESS of PS2 Census ESS. It implements numerous fixes and present a more reliable event stream. The service is composed of multiple microservices:

  • Collector service: Maintains connections to the Census ESS instances and collects, deduplicates, and multiplexes the event stream;
  • Manifold ESS: The endpoint of the NS ESS that exposes the event stream;
  • API service: exposes service states and commands like recent characters;
  • Auth service: forward auth service id validator.

Requirements

  • Node.js v18
  • Pnpm v8
  • Docker

Installation

# install dependencies and setup projects
$ pnpm i

# configuration of each app
$ cp .env.example .env

Running the service

For each individual service

# development, e.g.
$ pnpm stream-collector start

# watch mode
$  pnpm stream-collector start:dev

License

All NS projects are Apache-2.0 licensed.

stream's People

Contributors

github-actions[bot] avatar microwavekonijn avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

stream's Issues

Extend metrics

NSS could make use of additional metrics:

  • stream-api:
    • census connection state count(connected, disconnected);
    • census request latency;
  • stream-auth
    • service id check count(census, cache);
    • census service id check latency.

Improve deduplication headers

Headers send with messages in RabbitMQ are not quite there yet. Needs some additional work including hashing perhaps.

Let collector handle multiple connections with cycling algorithm

Each collector only has a single connection, with running multiple collectors with only some rudimentary functionality to manage connections. What we know now is that the ESS uses multiple instances, some of which can go bad. Each instance has its own heartbeat, which can be used to discriminate between instances.

The idea is to spawn multiple connections on a single collector and cycle connections such that between the connections the heartbeats are out of sync.

[refactor] Support replay

Let a connection replay messages from a certain point. This to allows clients to not miss any messages on reconnects.

The functionality can be achieved using RabbitMQs stream plugin. Retention will probably be around 5-10minutes depending on testing. To make use of this the client needs to provide a query parameter with a timestamp.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.