summaryrefslogtreecommitdiff
path: root/instances.json
diff options
context:
space:
mode:
authorBen Busby <noreply+git@benbusby.com>2021-10-21 17:07:43 -0600
committerBen Busby <noreply+git@benbusby.com>2021-10-21 17:07:43 -0600
commitcf8dfc5a85a7d655fef36ce735472a16635d8b7a (patch)
tree7433a9d7106afc9d91051d7c2b58cb02e27ef58e /instances.json
parentbe9606094c256471e256b1d00d6b681528547d58 (diff)
downloadfarside-cf8dfc5a85a7d655fef36ce735472a16635d8b7a.tar.gz
Initialize update script
My initial thought for this: create a simple redis db for storing key value pairs of instance -> list of live instances for each privacy front end (libreddit, bibliogram, etc). A script executed on a certain schedule would (in the background) check each instance to make sure it isn't down or unreasonably slow. If the instance is available, add it to a list of available instances in the db. When a user navigates to the revolver url (something like <url>/<service>/<...>), the app would pick a random value from the list returned by redis.get('<service>') and forward the user to that instance. As a side note, this could instead load the instances json from a remote source (like github or something) so that changes to instances don't need to involve a redeploy of the entire app.
Diffstat (limited to 'instances.json')
-rw-r--r--instances.json18
1 files changed, 18 insertions, 0 deletions
diff --git a/instances.json b/instances.json
new file mode 100644
index 0000000..9196b62
--- /dev/null
+++ b/instances.json
@@ -0,0 +1,18 @@
+[
+ {
+ "instance_type": "reddit",
+ "instance_test": "/r/popular",
+ "instance_list": [
+ "https://libredd.it",
+ "https://libreddit.spike.codes"
+ ]
+ },
+ {
+ "instance_type": "instagram",
+ "instance_test": "",
+ "instance_list": [
+ "https://bibliogram.art/u",
+ "https://bibliiogram.snopyta.org"
+ ]
+ }
+]