ambiguous-pointer opened a new pull request, #1428:
URL: https://github.com/apache/dubbo-admin/pull/1428
# 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**
```json
{
"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)
* [X] User Experience (graph visualization output)
* [ ] Core Component
* [ ] Docs
* [ ] Dubboctl
* [X] Feature
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]