Skip to content

Commit b773df8

Browse files
authored
Update README.md
1 parent b4e99a3 commit b773df8

File tree

1 file changed

+45
-40
lines changed

1 file changed

+45
-40
lines changed

README.md

+45-40
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,49 @@
55
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/ae50eb8e1303415f981ec755f0b8a28f)](https://app.codacy.com/gh/rvhonorato/jobd/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
66
[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/ae50eb8e1303415f981ec755f0b8a28f)](https://app.codacy.com/gh/rvhonorato/jobd/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage)
77

8+
This is a central component [WeNMR](https://wenmr.science.uu.nl), a worldwide
9+
e-Infrastructure for NMR and structural biology - operated by
10+
the [BonvinLab](https://bonvinlab.org) at the [Utrecht University](https://uu.nl).
11+
12+
It enables interaction between the web backend and the
13+
[research software developed in the Bonvinlab](https://github.com/haddocking) which
14+
are offered as web services for a community of over
15+
[52.000 users accross 154 countries](https://rascar.science.uu.nl/new/stats).
16+
817
`jobd` is a lightweight Golang application designed to facilitate interaction with
918
research software through REST APIs. It is specifically engineered to be deployed
1019
in multi-stage Docker builds, providing a flexible and portable solution for job
1120
management and file transfer.
1221

13-
## Key Features
22+
23+
24+
```mermaid
25+
flowchart LR
26+
B([User]) --> C[Web App]
27+
C[Web App] <--> Y[(Database)]
28+
C[Web App] --> X{{Orchestrator}}
29+
X -->|jobd| D[[prodigy]]
30+
X -->|jobd| E[[disvis]]
31+
X -->|jobd| G[[other_service]]
32+
E -->|slurml| H[local HPC]
33+
```
34+
35+
🚧 Documentation is still a work in progess 🚧
36+
37+
## Features
1438

1539
Implements two primary REST API endpoints:
1640

17-
- `/upload`: Allows backend systems or scripts to upload files to the container
18-
- `/download`: Enables retrieval of files from the container
41+
- `POST /api/upload` Allows backend systems or scripts to upload files to the container
42+
- `GET /api/get/:id` Enables retrieval of files (results) from the container
1943

20-
## Usage
44+
Use Cases
45+
46+
- Microservice-based job submission and file handling
47+
- Simplified API interfaces for research software workflows
48+
49+
50+
## Configuration
2151

2252
The application is optimized for containerized environments,
2353
supporting multi-stage build patterns or simple binary execution.
@@ -65,24 +95,11 @@ RUN tar -xzf /tmp/jobd_${JOBD_VERSION}_${JOBD_ARCH}.tar.gz -C /bin/ \
6595
ENTRYPOINT [ "/bin/jobd" ]
6696
```
6797

68-
## Use Cases
69-
70-
- Microservice-based job submission and file handling
71-
- Simplified API interfaces for research software workflows
72-
7398
## API description
7499

75-
### `/api/upload`
76-
77-
The `/api/upload` endpoint allows users to submit a job for processing in the queue system.
78-
79-
## Request Details
80-
81-
### HTTP Method
82-
83-
`POST`
100+
### `POST /api/upload` - submit a job for processing in the queue system.
84101

85-
### Request Body
102+
#### Request Body
86103

87104
The request body should be a JSON object representing a Job, with the following key properties:
88105

@@ -92,48 +109,36 @@ The request body should be a JSON object representing a Job, with the following
92109
| `Input` | string | Required | Base64 encoded .zip file containing: |
93110
| `Slurml` | boolean | Optional | Flag to indicate Slurm job submission |
94111

95-
### Input Zip File Structure
112+
#### Input Zip File Structure
96113

97114
The uploaded zip file must contain:
98115

99116
- `run.sh`: Executable shell script that defines the application command
100117
- Input files required by the application
101118

102-
Soon!
119+
### `GET /api/get/:id` - retrieve the status/result/details of a previously submitted job.
103120

104-
### `/api/get:id`
105-
106-
The `/api/get/:id` endpoint allows users to retrieve the status and details of a previously submitted job.
107-
108-
### Request Details
109-
110-
### HTTP Method
111-
112-
`GET`
113-
114-
### URL Parameters
121+
#### URL Parameters
115122

116123
| Parameter | Type | Required | Description |
117124
| --------- | ------ | -------- | ---------------------------------------- |
118125
| `id` | string | Required | Unique identifier of the job to retrieve |
119126

120-
## Response
121-
122-
### Successful Responses
127+
#### Response
123128

124-
#### Job Not Yet Completed
129+
##### Job Not Yet Completed
125130

126131
- **Status Code**: `206 Partial Content`
127132
- Returned when job is in a partial/incomplete state
128133
- **Body**: Job object with limited details
129134

130-
#### Job Completed
135+
##### Job Completed
131136

132137
- **Status Code**: `200 OK`
133138
- Returned when job has finished processing
134139
- **Body**: Job object with final status
135140

136-
### Response Object
141+
#### Response Object
137142

138143
The returned job object will have the following key characteristics:
139144

@@ -142,15 +147,15 @@ The returned job object will have the following key characteristics:
142147
- Final result/output - also a base64 encoded zip file
143148
- **Note**: `Input` and `Path` fields are deliberately cleared before response
144149

145-
### Possible Job Statuses
150+
#### Possible Job Statuses
146151

147152
- Pending
148153
- Processing
149154
- Partial
150155
- Completed
151156
- Failed
152157

153-
### Error Responses
158+
#### Error Responses
154159

155160
- **404 Not Found**: Job ID does not exist
156161
- **500 Internal Server Error**: Server-side processing error

0 commit comments

Comments
 (0)