system76 / bottle

Protobuf messages in a bottle
GNU General Public License v3.0
9 stars 6 forks source link

Add event for component kits changed #84

Closed codeadict closed 2 years ago

codeadict commented 2 years ago

Adds new message that will be sent from HAL to Warehouse when component kits change. It will allow to reload the state inside the Components GenServer without having to poll the Database for updates. the flow looks like:

                                                ComponentKitChanged  +---------------+
                                               +-------------------->|               |
                                               |                     |   Warehouse   |
                                               |                     |               |
                                               |                     +-------+-------+
                                               |                             |
+-----------+     +--------+           +-------+-----+                       |
|           |     |        |           |             |                       |
|  LCARS    +---->|  HAL   +---------->| RabbitMQ    |                       |  GetComponentDemands
|           |     |        |           |             |                       |
+-----------+     +--------+           +-------------+                       |
                                                                             v
                                                                    +---------------+
                                                                    |               |
                                                                    |   Assembly    |
                                                                    |               |
                                                                    +---------------+