Skip to content

Commit 770b65c

Browse files
committed
initial commit
1 parent ab0d4e6 commit 770b65c

33 files changed

Lines changed: 3381 additions & 0 deletions

.github/styles/config/vocabularies/TraceMachina/accept.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,5 @@ Brex
115115
Citrix
116116
Menlo
117117
benchmarked
118+
Datahouse
119+
WebSocket

web/live/.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
dist
2+
.wrangler
3+
.output
4+
.vercel
5+
.netlify
6+
.vinxi
7+
app.config.timestamp_*.js
8+
9+
# Environment
10+
.env
11+
.env*.local
12+
13+
# dependencies
14+
/node_modules
15+
16+
# IDEs and editors
17+
/.idea
18+
.project
19+
.classpath
20+
*.launch
21+
.settings/
22+
23+
# Temp
24+
gitignore
25+
26+
# System Files
27+
.DS_Store
28+
Thumbs.db

web/live/README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# nativelink-live
2+
Live feed viewer for NativeLink.
3+
This is useful when you want to see what's happening under the hood.
4+
5+
## State
6+
This is alpha software. It's not recommended for production use and not covered by SLA.
7+
8+
## Usage
9+
<!-- maybe live.nativelink.com -->
10+
You can use the website we host(TBA), or you can self-host it yourself.
11+
Since this is client-side only static web, you only need to get the service that serves these static files.
12+
13+
To build the static files, you need to have Node.js and `npm` installed.
14+
Then, run the following commands:
15+
16+
```bash
17+
npm install
18+
npm run build
19+
```
20+
21+
This will create a `dist` directory with the static files.
22+
You can serve this directory with any static file server, such as `nginx`, `caddy`, or `serve`.
23+
24+
TODO(ilsubyeega): add example configuration for serving this assets.
25+
26+
While for development, you may want to use `npm run dev` to start a local development server with hot-reload instead of building.
27+
28+
## Screenshot
29+
TBA
30+
31+
## Goals
32+
- Minimal code; minimal implementation.
33+
34+
## Non-goals
35+
- Invoking something on the NativeLink side; this is a read-only viewer.
36+
- dedicated tenant support and auth; should be handled by reverse proxy in front of the app
37+
- support old browser, this uses cutting-edge web technologies.
38+
39+
## License
40+
41+
Copyright 2020–2025 Trace Machina, Inc.
42+
43+
Licensed under the Functional Source License, Version 1.1, Apache 2.0 Future License.
44+
SPDX identifier: `FSL-1.1-Apache-2.0`.
45+
46+
After the second anniversary of the date this version was made available, you may use this
47+
software under the Apache License, Version 2.0.

web/live/TODOS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Modeling
2+
- [x] Figure out how UUID works: it has been reviewed but not explict; just a probability of like lottery
3+
- [ ] WebSockets or HTTP Streaming?
4+
- [ ] Modelling the data structure
5+
6+
# Impl
7+
8+
# Testing
9+
- [ ] Figure out how-to interatively test UIs

web/live/docs/APIS.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Datahouse
2+
Datahouse saves every activities from nativelink instances for metrics and provide APIs for querying.
3+
4+
## APIs
5+
- `GET /detail/:id` - Get the detail of a specific action by its ID. Datahouse will collect when: action is first created and then completed.
6+
7+
# Live Activity Monitor
8+
This service should collect every components from nativelink instances and then expose them via WebSocket.
9+
- WebSocket endpoint: `/ws?version=<NATIVELINK_LIVE_VERISON>`
10+
- For WebSocket formats, see [WEBSOCKETS.md](WEBSOCKETS.md)
11+
12+
## APIs
13+
- `GET /activities/overall` - Get the overall statistics of activities.
14+
- `GET /status/:id` - Get the status of a specific action by its ID. The service will cache the status for a while even if the action is completed.

web/live/docs/README.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Concepts
2+
3+
This document describes the concepts behind `nativelink-live`, a real-time live feed viewer for NativeLink.
4+
It's intended to provide insight into the inner workings of NativeLink by displaying live data feeds.
5+
6+
## Key Components
7+
8+
### Live Activity Monitor
9+
10+
This feature offers a real-time, filterable view of all activities occurring within NativeLink.
11+
It allows users to monitor events as they happen, providing immediate insights into system operations.
12+
13+
#### Key Capabilities:
14+
15+
- View real-time activities.
16+
- Filter activities by various criteria (for example, type, status).
17+
- Type: All, Upload, Download, Clients, Executions, Others
18+
- Status: All, Success, In Progress, Queued, Failed, Canceled
19+
- Search for specific activities using keywords.
20+
- Clicking the item would show like: Details, `Stdout`, `Stderr` (if applicable), Timestamp.
21+
22+
### Worker Status Dashboard
23+
24+
This dashboard provides a overview of the status of all workers in the NativeLink clusters.
25+
It displays information such as status, information, and metrics of each worker.
26+
27+
#### Key Capabilities:
28+
29+
- View the information of all workers.
30+
- Worker ID, Live Metrics(CPU, Memory, Disk, Network), Assigned Actions, Last Heartbeat
31+
- Status: Idle, Working, Unavailable, Offline
32+
- Idle: The worker is online and waiting for tasks.
33+
- Working: The worker is currently processing tasks. Also has sub-statuses: Downloading, Executing, Uploading
34+
- Unavailable: Temporarily unable to connect. Maybe worker is dead?
35+
- Offline: The worker is offline and not available for tasks.
36+
- Shows the assigned actions to each worker by tree-view.
37+
- Search for specific workers using keywords.
38+
39+
### Storage Status Overview
40+
41+
This overview provides a summary of the status of all storage connected to NativeLink.
42+
It displays information such as status, configuration, and usage of each storage.
43+
44+
### Client Connection Overview
45+
46+
This overview provides a summary of the status of all clients connected to NativeLink.
47+
This helps to identify which clients are interacting with the nativelink cluster, what they're doing.
48+
49+
#### Key Capabilities:
50+
Client ID, Connection Info, Status(Idle, Disconnected), Metrics(total execution, data transferred, last seen), Activities
51+
52+
### Log stream viewer
53+
54+
This feature provides a real-time stream of logs from NativeLink components.
55+
It allows of users/devs to monitor logs and deep-dive debugging without requiring terminal access of nativelink.
56+
The UI should be similar as Chromium's console tab viewer.

web/live/docs/WEBSOCKETS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# WebSocket
2+
Live feed should be fed by WebSocket server, for real-time purpose.

web/live/index.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1" />
6+
<meta name="theme-color" content="#000000" />
7+
<link rel="icon" type="image/png" href="https://nativelink-cdn.s3.us-east-1.amazonaws.com/nativelink_favicon.png" />
8+
<link rel="stylesheet" href="src/index.css" />
9+
<title>Nativelink Live</title>
10+
</head>
11+
<body>
12+
<noscript>You need to enable JavaScript to run this app.</noscript>
13+
<div id="root"></div>
14+
15+
<script src="/src/index.tsx" type="module"></script>
16+
</body>
17+
</html>

web/live/package.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"name": "nativelink-live",
3+
"type": "module",
4+
"dependencies": {
5+
"material-symbols": "^0.36.3",
6+
"solid-js": "^1.9.9"
7+
},
8+
"description": "Live view for nativelink",
9+
"devDependencies": {
10+
"@solidjs/testing-library": "^0.8.10",
11+
"@testing-library/jest-dom": "^6.9.1",
12+
"@testing-library/user-event": "^14.6.1",
13+
"@vitest/browser": "4.0.0-beta.17",
14+
"@vitest/browser-preview": "4.0.0-beta.17",
15+
"jsdom": "^25.0.1",
16+
"solid-devtools": "^0.34.4",
17+
"typescript": "^5.9.3",
18+
"vite": "^7.1.9",
19+
"vite-plugin-solid": "2.11.8",
20+
"vitest": "4.0.0-beta.17"
21+
},
22+
"license": "MIT",
23+
"scripts": {
24+
"build": "vite build",
25+
"dev": "vite",
26+
"serve": "vite preview",
27+
"start": "vite",
28+
"test": "vitest"
29+
},
30+
"version": "0.0.0"
31+
}

0 commit comments

Comments
 (0)