ferdium / ferdium-app

All your services in one place, built by the community
https://ferdium.org
Apache License 2.0
2.76k stars 164 forks source link

Cache services configuration in case the API server is down #1838

Open mbentley opened 1 month ago

mbentley commented 1 month ago

Preflight Checklist

Problem Description

When the Ferdium API service isn't available, it's not possible to open your services.

Proposed Solution

It would be ideal if the services information was cached locally and only refreshed from the API server. This would prevent an outage or network issue from breaking the user experience completely.

Alternatives Considered

Sit around and hope that the API server comes back online? Run my own so I can have a less reliable API server to use and additional maintenance overhead?

Additional Information

api.ferdium.org doesn't appear to be responding right now from my primary internet provider - luckily I have a secondary and when I force traffic for the current IP it resolves for over my secondary, it loads fine. This is just a side issue that described how I observed the behavior but it's something that I think should be taken into account when it comes to this as a feature as it puts a strong dependency on the API service being up.

vraravam commented 1 month ago

If you are not constantly moving / using Ferdium from multiple machines, the externally hosted Ferdium API is of minimal use to you. The only reason for that external hosting is to sync the preferences, the workspace configurations, the services that have been signed up and their configurations. (like a backup). If this is not that important for your usecase, I would suggest to go with the "Accountless option". Internally, that's just an internal (local) server responding with the same APIs as the externally hosted one. The only feature missing would be the cloud-based backup - which you would have to manually do (can be done by exporting the settings and re-importing on the new machine/installation)

Technically speaking, what you are asking for is the equivalent of always running the internal server, and then doing a 2-way sync from the locally stored db with the remote hosted one. Unfortunately, that brings up other complexities, and right now, I don't see many contributors spending voluntary time on Ferdium. (I'm only "keeping the lights on" with minimal contritbutions myself.) If you, OTOH, want to contribute and implement the feature that you are asking for, then I can help guide you through the setup on your local machine.