server

command module
v0.0.0-...-c387957 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: MIT Imports: 28 Imported by: 0

README

Server

This is the BoomPoW server, it coordinates work requests from users/services to "providers" that use the client.

About

The server is written in GOLang and requires Postgres and Redis, you can reference the docker-compose.yaml in the workspace root for details on how to run the server.

It provides a GraphQL API at /graphql and the schema can be seen here

A secure websocket endpoint is also available at /ws/worker this is the channel that the providers and server use to communicate work requests and responses.

Users are broken up into 2 categories:

  1. PROVIDER

Providers are the users who are providing work to BoomPoW in exchange for rewards.

  1. REQUESTER

The requesters are work consumers, services that have access to request work from BoomPoW and by proxy the providers.

Work is requested using the workGenerate mutation and requires authentication using a service token (not the JWT token returned from the login mutation). These tokens can be obtained using the generateServiceToken mutation.

There are some layers on protection to prevent users from requesting work.

  1. Email must be verified
  2. can_request_work must be set to true in the database

The second part is intended to happen manually, after a new service requests a key they will be manually approved, after which they can invoke the generateServiceToken mutation.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
src
net

Jump to

Keyboard shortcuts

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