skip to content
[readonly]

meshd's HTTP port: request heads relayed to the GPU http program, and the routes meshd answers itself (the views, infer, render)

sh
$ sexc add @ajax/mesh-http-relay
  • total 3
  • drwxr-xr-x-../
  • drwxr-xr-x-Oct 27 05:23v/# 1 version
  • drwxr-xr-x-Oct 27 05:23files/# the files of 0.1.0
latest
0.1.0, published Oct 27 05:23 by ajax
owners
ajax
license
MIT
dependencies
@ajax/mesh-shared ^0.1.0, @ajax/mesh-control ^0.1.0, @ajax/mesh-views ^0.1.0, @ajax/mesh-inferd ^0.1.0, @ajax/mesh-infer-request ^0.1.0, @ajax/mesh-log ^0.1.0, @ajax/mesh-abi ^0.1.0, @ajax/mesh-buf ^0.1.0, @ajax/mesh-rsfmt ^0.1.0, @ajax/mesh-chan ^0.1.0, @ajax/mesh-check ^0.1.0
dependents
@ajax/meshd
keywords
mesh alphaos http relay daemon
homepage
https://github.com/thomasdavis/alpha-c-mesh/tree/main/packages/mesh-http-relay
repository
https://github.com/thomasdavis/alpha-c-mesh
==> README.md <==
1# @ajax/mesh-http-relay
2
3meshd's HTTP port: request heads relayed to the GPU http program, and the routes meshd answers itself (the views, infer, render).
4
5The HTTP port (http.rs).
6
7The host only moves bytes: routing and responses are the GPU http program's (`req http` through its request window), except the fleet's views `/fleet`, `/jobs` and `/pipes`, GPT-2 inference (`/infer?prompt=..`) and a fleet-rendered image (`/render?job=..`, `/render.bmp?job=..`, `/render.ppm?job=..`), which meshd answers itself -- also where the http program cannot run. A request head must arrive within 2 s; at most 64 clients are served at once.
8
9```c
10#include "mesh/http_relay.h"
11```
12
13## Ported from
14
15[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) (Richard Safier, MIT): crates/mesh-host/src/http.rs: `serve`, `read_head`, `view_route`, `render_route`, `client`.
16
17## Tests
18
19- `tests/http.c`: http.rs's `view_routes` (and the render routes); over TCP: a view in text and JSON, a bad format (400), a head relayed to a stand-in http program, the 503 when it cannot answer, render without a blob thread, infer without a prompt; the connection counters.
20
21## Differences
22
23- `render` goes through @ajax/mesh-control's `mesh_control_render` hook (the jobs area's blob thread).
24
25## Licence
26
27MIT. See the repository's LICENSE.