satbackend

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2022 License: Apache-2.0 Imports: 28 Imported by: 0

README

ConstD, the constellation manager

constd is an experiment built on two other experiments, so you should be doubly afraid of using it in production. That said, we'd love your feedback! 🙂

Sat is designed to be run in a constellation, with many instances collaborating to execute a higher-level application. Specifically, constellations can run Atmo projects, which are comprised of several functions that coordinate to create a server application. Since these projects are declarative, it is possible to distribute the app's compute and let the constellation 'figure it out'. That's the goal of constd.

As mentioned up top, constd is an experiment built on two other experiments:

  • Sat, a small and fast WebAssembly server
  • Atmo proxy mode, designed to mesh with a constellation

Build and run constd

You'll need Go and Docker to run Sat and ConstD, and you'll need to clone the Sat and Atmo repos.

To get started, build Atmo proxy. In the Atmo repo, run:

make docker/dev/proxy

This builds the suborbital/atmo-proxy:dev Docker image.

Next, in the Sat repo, build constd and start it:

make constd

.bin/constd {absolute/path/to}/atmo/example-project/runnables.wasm.zip

constd will launch atmo-proxy and a constellation of Sat instances. Make a request to test it:

curl localhost:8080/hello -d 'my friend'

The atmo-proxy container receives the request, and proxies execution of the WebAssembly functions to the Sat constellation.

Currently, the following features normally found in an Atmo project won't work very well:

  • Access to cache
  • Authentication for HTTP/GraphQL requests
  • Access to static files

But these will come in time!

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddUpstreamRequest

type AddUpstreamRequest struct {
	UpstreamAddress string `json:"upstreamAddress"`
}

AddUpstreamRequest is a request to add an upstream

type MetricsResponse

type MetricsResponse struct {
	Scheduler scheduler.ScalerMetrics `json:"scheduler"`
}

MetricsResponse is a response that backend instances use to report their status

type Orchestrator

type Orchestrator struct {
	// contains filtered or unexported fields
}

func New

func New(opts *options.Options, syncer *syncer.Syncer) (*Orchestrator, error)

func (*Orchestrator) Shutdown

func (o *Orchestrator) Shutdown()

Shutdown signals to the orchestrator that shutdown is needed mostly only required for testing purposes as the OS handles it normally

func (*Orchestrator) Start

func (o *Orchestrator) Start(ctx context.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL