Wooo! FurtherFrom now shows recently calculated comparisons and the fly.io region where they originated. Phoenix pub/sub is a dream to use.

The homepage liveview subscribes to the topic to update the recent comparisons for all connected users. Each app also has a subscribing process that persists incoming recent comparisons if they didn’t originate from the app’s region.

It’s a bespoke approach that would be better done via LiteFS but I’m not sure how to get that working yet.

Build fast. Run any code fearlessly.

Build fast. Run any code fearlessly.

Fly.io

I can calculate comparisons from the console in any fly.io region and my liveview homepage updates all connected sessions.

iex(further-from@fdaa:0:69f0:a7b:8a:3:b0a4:2)1> System.get_env("FLY_REGION") "fra" iex(further-from@fdaa:0:69f0:a7b:8a:3:b0a4:2)2> FurtherFrom.Engine.compare(FurtherFrom.Timeline.get_random_event(), FurtherFrom.Timeline.get_random_event())
Build fast. Run any code fearlessly.

Build fast. Run any code fearlessly.

Fly.io