$ brew install gradle (optionnal)
$ brew install groovy (optionnal)
$ brew install vert.x
$ ./services.sh
$ ./server.sh
Every factory service announces itself to /city
{
"action": "hello",
"team": "choose your team name and stick to it",
"from": "unique instance id",
"type": "factory",
"version": "version"
}
- Factory emits cereal request to some type of farm (ex: /city/farm)
{
"action": "request",
"from": "factory id",
"quantity": 10
}
- Farm reply to the factory
{
"action": "response",
"from": "farm id",
"quantity": 10,
"cost": 100
}
- Factory reply Acquittement to the farm
- Store reply Acquittement to the factory
{
"action": "acquittement",
"from": "factory id",
"quantity": 9
}
- Farm send Bill to /city/bank
- Store send Bill to the /city/bank
{
"action": "bill",
"from": "farm id",
"charge": "factory id",
"quantity": 9,
"cost": 100
}