← notes

The same service, one string different

Sep 6, 2016

The same service as NYSE-Ticker against a different exchange.

NASDAQ: instead of NSE:, port 10121 instead of 10122. Everything else is identical, the same 402 decorator, the same 720 satoshi price, the same manifest structure, the same unvalidated symbol going into the same undocumented Google endpoint.

Two repositories, two deployed services, two manifest entries. That is the duplication tax of a microservice-per-endpoint architecture, and it is worth being fair about why it happened rather than treating it as obviously wrong.

21’s discovery model rewarded narrow services. The crawler indexed manifests, and a manifest described one capability at one price. A single parameterized service covering both exchanges would have been one deploy, one manifest and one thing to fix, and it would have been harder to list, harder to describe, and unable to price the two exchanges differently if that ever mattered. The architecture pushed toward one service per capability, and copying the file was the shortest path to what it wanted.

The cost shows up on the first shared bug, and both of these had two.

Both died the same day when Google removed the endpoint, so the duplication cost nothing at the end.