Today's IT systems are rapidly evolving, combining microservices with various cloud services. However, this also presents challenges like complex inter-service dependencies and protocol inconsistencies.
Challenge 1: Tight Coupling
When Service A calls Service B's API directly, changes to Service B's specifications can have a major impact on Service A. This is called "tight coupling."
Challenge 2: Protocol Inconsistency
Different services and cloud providers adopt various protocols like REST API, gRPC, and Pub/Sub. This complicates communication logic and becomes a bottleneck for development and maintenance.
To solve these challenges, we developed our own communication layer: the MCC Agent.
The MCC Agent is an intelligent proxy positioned between microservices like GAIA, ORION, and ZEUS, and GCP products such as Vertex AI and BigQuery.
2.1. Innovation 1: Enforcing Loose Coupling
The MCC Agent's most important role is to completely sever dependencies between services.
From the Application's Perspective GAIA doesn't know the specifics of ORION's API. It simply asks the MCC Agent to "send a PredictWaitTime request to a service called ORION."
From the MCC Agent's Perspective When the MCC Agent receives this request, it locates the ORION service and communicates with it via gRPC.
This mechanism allows services to focus on their own business logic, significantly reducing the risk of a change in one service affecting another.
2.2. Innovation 2: The Protocol Abstraction Mechanism
The MCC Agent has a unique mechanism for achieving protocol unification and abstraction.
A "Common Language" for Services All microservices communicate with the MCC Agent using a single protocol: gRPC. This frees developers from worrying about the complexities of different protocols like HTTP or Pub/Sub.
Leveraging google.protobuf.Any Request payloads are wrapped in a generic type called google.protobuf.Any. The MCC Agent doesn't need to know the specific data format inside the Any type to forward the request. This keeps the MCC Agent's core logic simple, eliminating the need to modify its code even when the proto definitions for GAIA or ORION change.
The "Smart Translator" The MCC Agent dynamically translates incoming gRPC requests into the native protocols of external services, such as the BigQuery REST API or the Vertex AI gRPC API.
This protocol abstraction allows us to treat GCP services like Cloud Spanner or BigQuery as if they were our own self-developed microservices.
App: Core application logic for each service (GAIA App, ORION App, ZEUS App)
MCC Client: The client part of the MCC Agent within each service (receives requests from the App via UDS and sends them to other services via gRPC)
MCC Server: The server part of the MCC Agent within each service (receives requests from other services via gRPC and notifies the App via UDS)
UDS: Unix Domain Socket communication
gRPC: gRPC communication (between MCC Client and MCC Server)
Service Mesh/LB: Service Mesh or Load Balancer (Envoy/Istio/GCP Load Balancer)
SR: Service Registry
Use Case: Customer dialogue start notification, preference prediction, suggestions, order requests, and wait time prediction.
sequenceDiagram participant Customer as Customer participant Mobile_UI as Mobile UI (Vue.js) participant GAIA_App as GAIA App Logic participant GAIA_MCC_C as GAIA MCC Client participant GAIA_MCC_S as GAIA MCC Server participant ORION_MCC_S as ORION MCC Server participant ORION_App as ORION App Logic participant VertexAI as Vertex AI participant CloudSpanner as Cloud Spanner participant SR as Service RegistryUse Case: A customer sends an AI friend registration request and it's approved.
sequenceDiagram participant C1_UI as Customer 1 Mobile UI participant C2_UI as Customer 2 Mobile UI participant GAIA_App as GAIA App Logic participant GAIA_MCC_C as GAIA MCC Client participant GAIA_MCC_S as GAIA MCC Server participant CloudSpanner as Cloud Spanner participant SR as Service RegistryUse Case: Customer 1's AI gets food preference info from Customer 2's AI.
sequenceDiagram participant C1_UI as Customer 1 Mobile UI participant GAIA_App as GAIA App Logic participant GAIA_MCC_C as GAIA MCC Client participant GAIA_MCC_S as GAIA MCC Server participant CloudSpanner as Cloud Spanner participant SR as Service Registry participant VertexAI as Vertex AIUse Case: Customer order prediction, "Like" notification for employees, and favorite employee registration.
sequenceDiagram participant Customer as Customer participant Mobile_UI as Mobile UI (Vue.js) participant GAIA_App as GAIA App Logic participant GAIA_MCC_C as GAIA MCC Client participant GAIA_MCC_S as GAIA MCC Server participant ORION_MCC_S as ORION MCC Server participant ORION_MCC_C as ORION MCC Client participant ORION_App as ORION App Logic participant Emp_UI as Employee UI (Vue.js) participant CloudSpanner as Cloud Spanner participant SR as Service Registry participant VertexAI as Vertex AIUse Case: An employee sets a favorite employee and sends a "Like."
sequenceDiagram participant Emp_UI_Sender as Employee UI (Sender) participant Emp_UI_Receiver as Employee UI (Receiver) participant GAIA_App as GAIA App Logic participant GAIA_MCC_C as GAIA MCC Client participant GAIA_MCC_S as GAIA MCC Server participant CloudSpanner as Cloud Spanner participant SR as Service RegistryUse Case: Shift generation and notification to employees.
sequenceDiagram participant CloudScheduler as Cloud Scheduler participant ORION_App as ORION App Logic participant ORION_MCC_C as ORION MCC Client participant ORION_MCC_S as ORION MCC Server participant Emp_UI as Employee UI participant VertexAI as Vertex AI participant CloudSQL as Cloud SQL participant GAIA_MCC_C as GAIA MCC Client participant GAIA_MCC_S as GAIA MCC Server participant SR as Service RegistryUse Case: An employee fills a shift shortage, and their contribution is visualized.
sequenceDiagram participant Emp_UI_Worker as Employee UI (Worker) participant Emp_UI_Team as Employee UI (Other team members) participant ORION_App as ORION App Logic participant ORION_MCC_C as ORION MCC Client participant ORION_MCC_S as ORION MCC Server participant CloudSQL as Cloud SQL participant GAIA_MCC_S as GAIA MCC Server participant GAIA_App as GAIA App Logic participant SR as Service RegistryUse Case: Aggregating customer space levels and teamwork levels and feeding them to ZEUS.
sequenceDiagram participant ORION_App as ORION App Logic participant ORION_MCC_C as ORION MCC Client participant ORION_MCC_S as ORION MCC Server participant ZEUS_MCC_S as ZEUS MCC Server participant ZEUS_App as ZEUS App Logic participant CloudSQL as Cloud SQL participant BigQuery as BigQuery participant CloudScheduler as Cloud Scheduler participant SR as Service RegistryUse Case: The AI automatically creates an order list, and an employee performs a final check.
sequenceDiagram participant CloudScheduler as Cloud Scheduler participant ORION_App as ORION App Logic participant ORION_MCC_C as ORION MCC Client participant ORION_MCC_S as ORION MCC Server participant Emp_UI as Employee UI participant VertexAI as Vertex AI participant CloudSQL as Cloud SQL participant SR as Service RegistryUse Case: Displaying dashboard data, manager's future prediction input, and dialogue with AI.
sequenceDiagram participant CloudScheduler as Cloud Scheduler participant CloudFunctions as Cloud Functions (ETL) participant CloudSpanner as Cloud Spanner participant CloudSQL as Cloud SQL participant BigQuery as BigQuery participant ZEUS_App as ZEUS App Logic participant ZEUS_MCC_C as ZEUS MCC Client participant ZEUS_MCC_S as ZEUS MCC Server participant Mgr_UI as Manager UI (React) participant VertexAI as Vertex AI participant SR as Service RegistryI'm working on the project from PM 6:00 to AM 3:00 (Asia/Tokyo) after my contract work is complete. The project is currently in the MVP (Minimum Viable Product) development phase.
As a pre-migration development environment for migrating to GCP, we've set up dummy servers for key GCP services to return responses.
Dummy Services
Vertex AI: A dummy service for machine learning models: This dummy service has methods like PredictTaste, PredictShiftDemand, ComparePredictions, and ExplainPrediction. It returns fixed dummy responses to requests from the MCC Agent.
Cloud Spanner: A dummy service for databases: This service mimics persistence requests from GAIA, such as RecordCustomerLike and SaveFriendRequest. It returns fixed dummy responses to requests from the MCC Agent.
Cloud SQL: A dummy service for a relational database: This service mimics shift management requests from ORION, such as GenerateShift and UpdateShift. It returns fixed dummy responses to requests from the MCC Agent.
BigQuery: A dummy service for a data warehouse: This dummy service has methods like GetDashboardData and FeedSpaceLevels. It returns fixed dummy responses to requests from the MCC Agent.
GAIA -> Vertex AI (PredictTaste)
GAIA's test_client.go sends a UDS gRPC request to the MCC Agent.
The MCC Agent forwards a TCP gRPC request to the dummy Vertex AI.
The MCC Agent returns the response from the dummy Vertex AI to GAIA via UDS gRPC.
Result: Confirmed that GAIA can call Vertex AI's PredictTaste method via the MCC Agent.
GAIA -> Cloud Spanner (RecordCustomerLike, SaveFriendRequest, etc.)
Flow: Similar to the Vertex AI flow, a UDS gRPC request is sent from test_client.go, forwarded as TCP gRPC by the MCC Agent, and the response is returned to GAIA.
Result: Confirmed that GAIA can call Cloud Spanner's data manipulation methods via the MCC Agent.
ORION -> Vertex AI (PredictShiftDemand)
Flow: Similar to the GAIA-Vertex AI flow, with ORION's test_client.go initiating the request.
Result: Confirmed that ORION can call Vertex AI's PredictShiftDemand method via the MCC Agent.
ORION -> Cloud SQL (GenerateShift, UpdateShift, etc.)
Flow: A UDS gRPC request is sent from ORION's test_client.go, forwarded by the MCC Agent as TCP gRPC, and the response is returned to ORION.
Result: Confirmed that ORION can call Cloud SQL's shift management methods via the MCC Agent.
ZEUS -> BigQuery (GetDashboardData)
Flow: A UDS gRPC request is sent from ZEUS's test_client.go, forwarded by the MCC Agent as TCP gRPC, and the response is returned to ZEUS.
Result: Confirmed that ZEUS can call BigQuery's GetDashboardData method via the MCC Agent.
Full Implementation of ZEUS Use Cases
Remaining verification includes the flow for ZEUS to call Vertex AI's ComparePredictions and ExplainPrediction.
We also need to implement and verify the server logic for accepting FeedSpaceLevels requests from ORION to ZEUS.
Enhanced Error Handling
Currently, errors in the MCC Agent and dummy services are often handled with a simple fmt.Errorf. For production, we'll need more robust error handling, such as retries and circuit breakers.
Concrete Dummy Service Implementations
The dummy services currently return only fixed values. Adding more complex data processing and business logic to them would expand the scope of our Proof of Concept (PoC) verification.
Load and Performance Testing
We haven't yet verified performance aspects, such as the overhead of UDS gRPC vs. TCP gRPC or the throughput of the MCC Agent.