public inbox for pdm-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pdm-devel] [PATCH datacenter-manager v2 0/3] refactor api caching & try to reuse the cache
@ 2025-10-17 12:00 Dominik Csapak
  2025-10-17 12:00 ` [pdm-devel] [PATCH datacenter-manager v2 1/3] server: api: resources: change use of remote to reference Dominik Csapak
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Dominik Csapak @ 2025-10-17 12:00 UTC (permalink / raw)
  To: pdm-devel

This series introduces a small refactored struct to access the api cache
(like we used for resources + subscription) so that we don't have to
repeat the same way for every bit of data we want to cache.

It also shows how we can add a mechanism to live update this cache
for e.g. pve resources api call and utilize it when the
remote is not reachable

changes from v2:
* use proper api type to convey that the result was cached
* abstract the 'update, fall back to cache' helper into the ApiCache
  struct (it'll probably be useful for more api calls)
* update the cli client for this too
* some smaller things @Lukas mentioned (thanks!)

Dominik Csapak (3):
  server: api: resources: change use of remote to reference
  server: introduce ApiCache abstraction
  api/ui: pve: get cluster resources from cache if remote is unreachable

 cli/client/src/pve.rs                        |   4 +-
 lib/pdm-api-types/src/resource.rs            |  24 +++
 lib/pdm-client/src/lib.rs                    |   4 +-
 server/src/api/pve/mod.rs                    |  63 ++++---
 server/src/api/resources.rs                  | 163 +++++--------------
 server/src/api_cache.rs                      | 128 +++++++++++++++
 server/src/lib.rs                            |   1 +
 server/src/metric_collection/top_entities.rs |   2 +-
 ui/src/pve/mod.rs                            |  27 ++-
 9 files changed, 259 insertions(+), 157 deletions(-)
 create mode 100644 server/src/api_cache.rs

-- 
2.47.3



_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-10-17 12:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-17 12:00 [pdm-devel] [PATCH datacenter-manager v2 0/3] refactor api caching & try to reuse the cache Dominik Csapak
2025-10-17 12:00 ` [pdm-devel] [PATCH datacenter-manager v2 1/3] server: api: resources: change use of remote to reference Dominik Csapak
2025-10-17 12:00 ` [pdm-devel] [PATCH datacenter-manager v2 2/3] server: introduce ApiCache abstraction Dominik Csapak
2025-10-17 12:00 ` [pdm-devel] [PATCH datacenter-manager v2 3/3] api/ui: pve: get cluster resources from cache if remote is unreachable Dominik Csapak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal