Five backends, one door
Their platform had grown into five separate services — some GraphQL, some REST, each with
its own login and its own idea of what a response looks like. The mobile app had to talk
to all of them. I was the engineer closest to the client, so the integration was mine.
I put one typed layer over the whole thing, organised by subject rather than by service,
so the other developer could call api.auth.signIn() and never learn which
backend was behind it. When one of them changed — and they changed constantly — the fix
happened in one file instead of across every screen that touched it.
I did consider putting a real service in the middle, which is the textbook answer. But a
sixth deployable, pointed at five moving targets, is a maintenance bill with no ceiling.
The client-side layer took two weeks, added nothing to run, and gave us one place to
absorb whatever they did next.
The rewrite that did not happen
Their technical co-founder wanted to add a sixth service, written in Rust, because the
driver-matching was slow. I had concerns, and they were mostly about us: nearly every bug
we were chasing traced back to a change in one of their existing services, and a new one
in a new language meant more of that, plus waiting on their team to build it.
I had asked for read access to their backend earlier, so I could understand what we were
integrating against, and they had given it to me. Our contract was frontend only — I could
not fix anything on their side, but I could see it. What I saw looked like an algorithm
and a data-structure choice rather than anything a language would fix.
So I walked him through it: the specific problems we had been hitting, and the workarounds
we were carrying on our side to absorb them. Not a verdict — the list. He agreed to look
at what they already had first. Their team made a round of optimisations that cleared
several bugs we had been flagging for weeks, and we shipped on schedule.
if he had insisted, I would have supported it. It is their system. I would have put the
new service behind our layer so it did not slow the app down.