On page load
sequenceDiagram
participant App Service
participant Config Server
participant Shop Server
participant POS
App Service->>+Config Server: Use the token to exchange<br/>the table number after page load
Config Server->>+Shop Server: Pass the request to shop via a tunnel
Shop Server-->>-Config Server: Return the validation result
Config Server-->>-App Service: Use the table number to load order<br/>or display an error
App Service->>Config Server: Get the config like the theme, buffet menu, etc.
App Service->>+Config Server: Load the table order to ensure the table is ready
Config Server->>+Shop Server: Pass the request to shop via a tunnel
Shop Server->>+POS: Get the detail of the table
POS-->>-Shop Server: Return the detail of the table
Shop Server-->>-Config Server: Return the detail of the table
Config Server-->>-App Service: Serve regular menu or buffet menu<br/>by checking the detail of the table
Place order
sequenceDiagram
participant App Service
participant Config Server
participant Shop Server
participant POS
App Service->>+Config Server: Place the table order with an order token
Config Server->>+Shop Server: Pass the request to shop via a tunnel
Shop Server->>+POS: Return an error if the order token is in<br/>the success list or the pending list.<br/>Pass to POS if not in the success list<br/>and the pending list.
POS-->>-Shop Server: Return a status
Shop Server-->>-Config Server: Return the status
Config Server-->>-App Service: Display the success message or the error message