Implement a basic version of batch api on go language
- git
- golang
- curl
- Batch API
A restful api which will accept multiple requests combined as a batch request.
Individual requests are executed simultaneously. Once all requests are processed the combined result are returned
- Product API
A restful api which will server product information
- Price API
A restful api which will server price information
- Promotion API
A restful api which will server promotion information
-
clone the repository
git clone https://github.com/jojiisacth/golangBatchApi.git
-
start the individual apis as follows
cd <root>/priceapi && ./setup.sh cd <root>/productapi && ./setup.sh cd <root>/promotionapi && ./setup.sh
-
start the batch api as follows
cd <root>/batchApi && ./setup.sh
Now the bath api is ready
-
Test send bact requests as follow
cd <root>/batchApi curl -vX POST http://localhost:8080/batch/ -d @request.json --header "Content-Type: application/json"