The evolution of Wandrer's 'untraveled roads' feature

By wandrer earth

What I like about the evolution of this feature is that it has some very common software architecture themes in it, like, “how do you reframe one big problem into many small problems?” We no longer need to care about how many activities a user has since we can serve only the portions of the map in view, rather than the entire dataset.

Another theme that comes to mind is, “what can be done in the background and what has to be done live?” Wandrer still uses both approaches for serving map data, and it feels like the right balance. Moving expensive computations out of the main app database and on to an external tile-processing server was absolutely the right choice. As Wandrer grows or requirements change, it’s possible that I’ll need to rethink this feature once again.

And finally, the question of “what does it make sense to scale?” comes up. Just scaling up the app’s main database server was always an option here, but adding CPU to a hosted Postgresql database comes at a much higher price than a correspondingly powerful VPS. Being able to offload common data processing tasks to an external “dumb” server is way cheaper and frees up the expensive app database to do more valuable work.

Read here