Skip to content

jeromedoucet/sim-service

 
 

Repository files navigation

Requirements

$ brew install gradle (optionnal)
$ brew install groovy (optionnal)
$ brew install vert.x

Getting started

Start services

$ ./services.sh

Start server

$ ./server.sh

Streams

Hello :

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"
}

Request :

  • Factory emits cereal request to some type of farm (ex: /city/farm)
{
   "action": "request",
   "from": "factory id",
   "quantity": 10
}

Response :

  • Farm reply to the factory
{
    "action": "response",
    "from": "farm id",
    "quantity": 10,
    "cost": 100
}

Acquittement :

  • Factory reply Acquittement to the farm
  • Store reply Acquittement to the factory
{
    "action": "acquittement",
    "from": "factory id",
    "quantity": 9
}

Bill

  • 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
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 54.0%
  • Java 24.5%
  • CSS 18.6%
  • Groovy 2.5%
  • Shell 0.4%