Skip to content

Commit

Permalink
feat(backend): caching on asset and wallet address including other en…
Browse files Browse the repository at this point in the history
…hancements (#3041)

* feat(2981): initial caching updates for asset and wallet address.

* feat(2981): compilation issues.

* feat(2981): compilation issues.

* feat(2981): remove interledgerjs and merge with main branch.

* feat(2981): fix test cases for service layers without cache.

* feat(2981): fix test cases for service layers without cache.

* feat(2981): Blair review feedback.

* feat(2981): Test case for cache on wallet service.

* feat(2981): Test case for cache on wallet service and asset.

* feat(2981): middleware stats.

* feat(2981): comparable balance calculation.

* feat(2981): remove header.

* feat(2981): review feedback.

* feat(2981): cache peer issue.

* feat(2981): getCounter is getHistogram fix.

* feat(2981): case fix.

* feat(2981): fix review comments from Max.

* feat(2981): fix review comments from Max.

* feat(2981): make use of cache for outgoing payment.

* feat(2981): fix quote.

* feat(2981): caching in the outgoing payment.

* feat(2981): fix caching misplacement.

* feat(2981): fix case issue with lowercase.

* feat(2981): review feedback from Max.

* feat(2981): fix asset.

* feat(2981): address review comments from Max.

* feat(2981): address review comments from @mkurapov. Enhancements.

* feat(2981): address review comments from @mkurapov. Enhancements.

* feat(2981): address review comments from @mkurapov. Make use of cdi for cache.

* feat(2981): address review comments from @mkurapov. Dashboard and object containing.

* feat(2981): address review comments from @mkurapov. Remove timer on error handler.

* feat(2981): address review comments from @mkurapov. Cache walletAddress on quote.

* feat(2981): address review comments from @mkurapov. Formatting.
  • Loading branch information
koekiebox authored Nov 27, 2024
1 parent ad9ca7c commit 98e165a
Show file tree
Hide file tree
Showing 31 changed files with 777 additions and 282 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ build
packages/**/src/openapi/specs/schemas.yaml
packages/**/src/openapi/specs/auth-server.yaml
packages/**/src/openapi/specs/resource-server.yaml
packages/**/src/openapi/specs/wallet-address-server.yaml
packages/**/src/openapi/specs/wallet-address-server.yaml
86 changes: 65 additions & 21 deletions localenv/telemetry/grafana/provisioning/dashboards/example.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "11.2.0",
"pluginVersion": "11.3.1",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -142,7 +142,7 @@
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "11.2.0",
"pluginVersion": "11.3.1",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -238,7 +238,7 @@
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "11.2.0",
"pluginVersion": "11.3.1",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -322,6 +322,12 @@
"id": 6,
"options": {
"displayMode": "gradient",
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": false
},
"maxVizHeight": 300,
"minVizHeight": 16,
"minVizWidth": 8,
Expand All @@ -336,7 +342,7 @@
"sizing": "auto",
"valueMode": "color"
},
"pluginVersion": "11.2.0",
"pluginVersion": "11.3.1",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -412,7 +418,7 @@
}
]
},
"pluginVersion": "11.2.0",
"pluginVersion": "11.3.1",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -540,6 +546,7 @@
"sort": "none"
}
},
"pluginVersion": "11.3.1",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -742,6 +749,7 @@
"sort": "none"
}
},
"pluginVersion": "11.3.1",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -906,6 +914,7 @@
"sort": "none"
}
},
"pluginVersion": "11.3.1",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -1031,6 +1040,7 @@
"sort": "none"
}
},
"pluginVersion": "11.3.1",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -1233,6 +1243,7 @@
"sort": "none"
}
},
"pluginVersion": "11.3.1",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -1375,7 +1386,30 @@
},
"unit": "ms"
},
"overrides": []
"overrides": [
{
"__systemRef": "hideSeriesFrom",
"matcher": {
"id": "byNames",
"options": {
"mode": "exclude",
"names": ["AccountingService:Postgres:getAccountBalances"],
"prefix": "All except:",
"readOnly": true
}
},
"properties": [
{
"id": "custom.hideFrom",
"value": {
"legend": false,
"tooltip": false,
"viz": true
}
}
]
}
]
},
"gridPos": {
"h": 7,
Expand All @@ -1396,6 +1430,7 @@
"sort": "none"
}
},
"pluginVersion": "11.3.1",
"targets": [
{
"datasource": {
Expand All @@ -1408,9 +1443,22 @@
"legendFormat": "__auto",
"range": true,
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "${PrometheusDS}"
},
"editorMode": "code",
"expr": "sum by (callName) (rate(tb_get_account_balances_sum[$__rate_interval])/rate(tb_get_account_balances_count[$__rate_interval]))",
"hide": false,
"instant": false,
"legendFormat": "__auto",
"range": true,
"refId": "B"
}
],
"title": "PSQL Get Account Balance",
"title": "Get Account Balance",
"type": "timeseries"
},
{
Expand Down Expand Up @@ -1462,7 +1510,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
Expand Down Expand Up @@ -1493,14 +1542,15 @@
"sort": "none"
}
},
"pluginVersion": "11.3.1",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${PrometheusDS}"
},
"editorMode": "code",
"expr": "(increase(packet_amount_fulfill_total[30s]) * 0.5 * 0.0001)",
"expr": "sum by (source) (increase(packet_amount_fulfill_total[30s]) * 0.0001)",
"hide": false,
"instant": false,
"interval": "",
Expand Down Expand Up @@ -1561,7 +1611,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
Expand Down Expand Up @@ -1592,14 +1643,15 @@
"sort": "none"
}
},
"pluginVersion": "11.3.1",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${PrometheusDS}"
},
"editorMode": "code",
"expr": "sum by (source) (round(increase(transactions_total[30s]) * 0.5))",
"expr": "sum by (source) (round(increase(transactions_total[30s])))",
"hide": false,
"instant": false,
"interval": "",
Expand All @@ -1612,46 +1664,38 @@
"type": "timeseries"
}
],
"preload": false,
"refresh": "15s",
"schemaVersion": 39,
"schemaVersion": 40,
"tags": [],
"templating": {
"list": [
{
"current": {
"selected": false,
"text": "Prometheus",
"value": "PBFA97CFB590B2093"
},
"description": "The Prometheus data-source.",
"hide": 0,
"includeAll": false,
"multi": false,
"name": "PrometheusDS",
"options": [],
"query": "prometheus",
"queryValue": "",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"type": "datasource"
},
{
"current": {
"selected": false,
"text": "Tempo",
"value": "P214B5B846CF3925F"
},
"description": "The Tempo datasource uid.",
"hide": 0,
"includeAll": false,
"multi": false,
"name": "TempoDS",
"options": [],
"query": "tempo",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"type": "datasource"
}
]
Expand Down
Loading

0 comments on commit 98e165a

Please sign in to comment.