https://github.com/abiosoft/orchestra
Minimalistic Orchestration Layer
https://github.com/abiosoft/orchestra
Last synced: 9 months ago
JSON representation
Minimalistic Orchestration Layer
- Host: GitHub
- URL: https://github.com/abiosoft/orchestra
- Owner: abiosoft
- License: mit
- Created: 2015-03-16T01:00:44.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-04-14T09:36:33.000Z (about 11 years ago)
- Last Synced: 2025-03-17T05:21:22.805Z (over 1 year ago)
- Language: Go
- Size: 1.87 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Orchestra
#### Minimalistic Orchestration Layer
[](https://drone.io/github.com/abiosoft/orchestra/latest)
Runs API calls concurrently
### Usage
#### APIs
APIs are set via comma separated key value column pairs through the `requests` query parameter.
```
http://127.0.0.1:8080?requests=identifier1:http://url1.xyz,identifier2:http://url2.xyz
```
What if the `value` url has its own query parameters? Url encode the entire query string starting from `?`.
### Parameters
| Parameter | Description | Default | Expected Value |
| --------- | ----------- | ------- | ----- |
| requests* | Key value column pairs | | String |
| timeout | Timeout in milliseconds | 10000 | Integer
| type | Response Type | json | String, one of `[json, delimiter]` |
| delimiter**| Delimiter to use| ---XXX--- | String |
`* Required`
`** Requires type=delimiter`
Sample request with all parameters
```
http://127.0.0.1:8080?requests=id1:http://url1.xy,id2:http://url2.xy&timeout=500&type=delimiter&delimiter=---XXX---
```
### Response
Response comes in 2 format specified by `type` parameter.
#### 1. Json
```json
[
{
"id": "identifier1",
"status_code": 200,
"status": "200 OK",
"duration": "130ms",
"body": "
It works!
\n"
},
{
"id": "identifier2",
"status_code": 400,
"status": "400 Bad Request",
"duration": "10ms",
"body": "Bad Request: required parameter 'requests' missing."
},
{
"id": "identifier3",
"error": "Request timed out"
}
]
```
#### 2. Delimiter Separated
```
Id: identifier1, Status: 200 OK, Duration: 130ms
It works!
---XXX---
Id: identifier2, Status: 400 Bad Request, Duration: 10ms
Bad Request: required parameter 'requests' missing.
---XXX---
Id: identifier3, Status: error
Request timed out
```
### Server
Defaults to Port `8080` but can be overidden using the first command line argument
```shell
$ orchestra 8080
Orchestra listening on port 8080
```
### State
Orchestra is still in very early stage and active development
### Installation
```shell
$ go get github.com/abiosoft/orchestra
```
Go is a prerequisite, [install it here](https://golang.org/doc/install) if you do not have it installed.
### Planned
* Support POST and other request types.
* Configuration files.
* Web Interface.
* Better CLI support.
* Request hierarchy and dependency. Ability to call one request before the other and possibly extract values from response of one request to use in another request.
* Robust test cases and high code coverage.
* Project page.