Skip to content
/ reba Public

Scalable service worker subset for running on server side

Notifications You must be signed in to change notification settings

astroza/reba

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reba

Reba is a Service Worker subset implementation for running on server side.

Features

  • Hot reconfiguration by HTTP API: Privileged Isolate to manage WorkerGroups
  • Integrated cache system (?)

Plan

  • Boost Beast HTTP/1.1 Web Server
  • Web Fetch API
  • Websocket support
  • Web Crypto API
  • Basic functions: setTimeout, setInterval

Design

Reba has two essential entities:

  • WorkerGroup: A group of threads running the same script. It scales itself automatically based on the group's load.
  • Router: A global instance storing the data needed to route an web request to an specific WorkerGroup

There is a special WorkerGroup created when Reba is started

  • WorkerGroup Zero: It has a privileged context able to create new WorkerGroups and set routes.

The expected behavior of WorkerGroup Zero is:

  • Connect to a control plane by Fetch API or Websocket
  • Get the configured scripts and routes from the control plane
  • Create the needed WorkerGroups
  • Poll/wait for changes from the control plane

References

About

Scalable service worker subset for running on server side

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published