This is a POC on how to create DAGs and use that to drive routing decisions
You can use docker to build and test this locally. See the Makefile for rules
Use the following commands to build and run docker
make docker-build && make docker-run
Use Ctrl+C to end the container once testing is done
Use this to clean up post-testing
make docker-clean
The red arrows are Choice A
The blue is Choice B
and green is Choice C
curl --location 'localhost:8080/next' \
--header 'Content-Type: application/json' \
--data '{
"current_node": "specialty_node",
"input_kvp": {
"choice": "a"
}
}'
which takes in 2 values:
- current node id
- key-value pair with whatever inputs we wanna share with the server
the decision of which node to go to would be made using these 2 inputs
Sample Response
next node id: services_node
This endpoint is used to fetch metadata about a specific node. Can be invoked using
curl --location 'localhost:8080/node/specialty_node'
which returns the response:
route: /specialties
Method: GET
make run