5
5
[ ![ 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 )
6
6
[ ![ 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 )
7
7
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
+
8
17
` jobd ` is a lightweight Golang application designed to facilitate interaction with
9
18
research software through REST APIs. It is specifically engineered to be deployed
10
19
in multi-stage Docker builds, providing a flexible and portable solution for job
11
20
management and file transfer.
12
21
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
14
38
15
39
Implements two primary REST API endpoints:
16
40
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
19
43
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
21
51
22
52
The application is optimized for containerized environments,
23
53
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/ \
65
95
ENTRYPOINT [ "/bin/jobd" ]
66
96
```
67
97
68
- ## Use Cases
69
-
70
- - Microservice-based job submission and file handling
71
- - Simplified API interfaces for research software workflows
72
-
73
98
## API description
74
99
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.
84
101
85
- ### Request Body
102
+ #### Request Body
86
103
87
104
The request body should be a JSON object representing a Job, with the following key properties:
88
105
@@ -92,48 +109,36 @@ The request body should be a JSON object representing a Job, with the following
92
109
| ` Input ` | string | Required | Base64 encoded .zip file containing: |
93
110
| ` Slurml ` | boolean | Optional | Flag to indicate Slurm job submission |
94
111
95
- ### Input Zip File Structure
112
+ #### Input Zip File Structure
96
113
97
114
The uploaded zip file must contain:
98
115
99
116
- ` run.sh ` : Executable shell script that defines the application command
100
117
- Input files required by the application
101
118
102
- Soon!
119
+ ### ` GET /api/get/:id ` - retrieve the status/result/details of a previously submitted job.
103
120
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
115
122
116
123
| Parameter | Type | Required | Description |
117
124
| --------- | ------ | -------- | ---------------------------------------- |
118
125
| ` id ` | string | Required | Unique identifier of the job to retrieve |
119
126
120
- ## Response
121
-
122
- ### Successful Responses
127
+ #### Response
123
128
124
- #### Job Not Yet Completed
129
+ ##### Job Not Yet Completed
125
130
126
131
- ** Status Code** : ` 206 Partial Content `
127
132
- Returned when job is in a partial/incomplete state
128
133
- ** Body** : Job object with limited details
129
134
130
- #### Job Completed
135
+ ##### Job Completed
131
136
132
137
- ** Status Code** : ` 200 OK `
133
138
- Returned when job has finished processing
134
139
- ** Body** : Job object with final status
135
140
136
- ### Response Object
141
+ #### Response Object
137
142
138
143
The returned job object will have the following key characteristics:
139
144
@@ -142,15 +147,15 @@ The returned job object will have the following key characteristics:
142
147
- Final result/output - also a base64 encoded zip file
143
148
- ** Note** : ` Input ` and ` Path ` fields are deliberately cleared before response
144
149
145
- ### Possible Job Statuses
150
+ #### Possible Job Statuses
146
151
147
152
- Pending
148
153
- Processing
149
154
- Partial
150
155
- Completed
151
156
- Failed
152
157
153
- ### Error Responses
158
+ #### Error Responses
154
159
155
160
- ** 404 Not Found** : Job ID does not exist
156
161
- ** 500 Internal Server Error** : Server-side processing error
0 commit comments