Skip to content

feat: Add service graph visualization and enhance SearchService#1428

Open
ambiguous-pointer wants to merge 7 commits intoapache:feat/topologyfrom
ambiguous-pointer:develop
Open

feat: Add service graph visualization and enhance SearchService#1428
ambiguous-pointer wants to merge 7 commits intoapache:feat/topologyfrom
ambiguous-pointer:develop

Conversation

@ambiguous-pointer
Copy link

Service/Application Dependency Graph Enhancement

This change evolves the service/application dependency‑graph feature that was introduced in the previous PR.
It keeps the original intent – tracing upstream/downstream relationships via ServiceProviderMetadataResource and
ServiceConsumerMetadataResource – but adapts the backend to return a new node/edge schema required by the front‑end.


📌 What’s New

  • Graph payload structure has changed
    The API now emits a richer “typed” graph similar to the example below.
    Service nodes (interface names) and application nodes are both present; each node declares
    its type (application or service) plus a rule (provider/consumer/empty).

  • Example response

    {
        "code": "Success",
        "message": "success",
        "data": {
            "nodes": [
                {
                    "id": "order-service",
                    "label": "order-service",
                    "type": "application",
                    "rule": "provider"
                },
                {
                    "id": "order-service-01",
                    "label": "order-service-01",
                    "type": "application",
                    "rule": "provider"
                },
                {
                    "id": "com.ecommerce.api.service.OrderService::",
                    "label": "com.ecommerce.api.service.OrderService::",
                    "type": "service",
                    "rule": ""
                },
                {
                    "id": "payment-service",
                    "label": "payment-service",
                    "type": "application",
                    "rule": "consumer"
                }
            ],
            "edges": [
                {
                    "source": "com.ecommerce.api.service.OrderService::",
                    "target": "order-service",
                    "data": {
                        "type": "provides"
                    }
                },
                {
                    "source": "com.ecommerce.api.service.OrderService::",
                    "target": "order-service-01",
                    "data": {
                        "type": "provides"
                    }
                },
                {
                    "source": "payment-service",
                    "target": "com.ecommerce.api.service.OrderService::",
                    "data": {
                        "type": "consumes"
                    }
                }
            ]
        }
    }
  • Maintained capabilities

    1. Filtering by ServiceName to narrow the graph to a single service.
    2. Aggregating multiple versions/instances into app‑level nodes.
    3. Utilising the same metadata resources as before.
    4. Efficient edge deduplication via auxiliary maps.

📁 Affected Areas / Review Checklist

  • Console API (service package handlers)
  • User Experience (graph visualization output)
  • Core Component
  • Docs
  • Dubboctl
  • Feature

@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 8, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant