https://github.com/hexagon-dev/rpc-master
Microservices on RPC.
https://github.com/hexagon-dev/rpc-master
docker laravel rpc
Last synced: 8 months ago
JSON representation
Microservices on RPC.
- Host: GitHub
- URL: https://github.com/hexagon-dev/rpc-master
- Owner: Hexagon-Dev
- Created: 2022-01-19T12:29:53.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-01-21T11:52:07.000Z (about 4 years ago)
- Last Synced: 2025-03-03T11:44:30.064Z (about 1 year ago)
- Topics: docker, laravel, rpc
- Language: PHP
- Homepage:
- Size: 93.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RPC-MASTER
It's a main app connected with three micro-services.
Each of them has it's own Nginx.
Proxying is made by traefik.
Uses [sajya/server](https://github.com/sajya/server) & some code to communicate with micro-services through api.
## Usage
Start app in docker:
```bash
docker-compose up
```
Than you can make request on localhost/api/process with json:
```json
[
{
"jsonrpc": "2.0",
"method": "http://rpc1_alias/api/v1/endpoint|math@sum",
"params": [
1,
2,
3
],
"id": 2
},
{
"jsonrpc": "2.0",
"method": "rpc2_alias/api/v1/endpoint|math@multiply",
"params": [
1,
2,
3
],
"id": 3
},
{
"jsonrpc": "2.0",
"method": "rpc3_alias/api/v1/endpoint|math@average",
"params": [
1,
2,
3
],
"id": 4
}
]
```
As a result wou will get formatted responce:
```json
[
{
"id": "2",
"result": {
"summary": 6
},
"jsonrpc": "2.0"
},
{
"id": "3",
"result": {
"multiply": 6
},
"jsonrpc": "2.0"
},
{
"id": "4",
"result": {
"average": 2
},
"jsonrpc": "2.0"
}
]
```