jonnify·bcs /bcs/codemojex/the-live-surface/production-on-fly

B7.6.3 · dive 3 of 3 · module B7.6

Production on Fly.

The whole game runs as one long-lived application — a single supervised tree over the database, PubSub, the bus and its workers, and the endpoint — with no ephemeral tier, deployed and scaled as Machines on Fly.

One supervised Application, a persistent service, and deployment as Machines on Fly. Select a part.
the ApplicationRepoPubSubbus + workersendpoint long-livedsteady loadno ephemeral tier on Fly Machinesscale by cloningthe tree is the unit
readout · Select a part. One Application supervises the Repo, PubSub, the bus and its workers, and the endpoint; it is a long-lived service with steady load and no ephemeral tier; it deploys and scales as Machines on Fly.
§1

The idea

codemojex · production on fly

The whole game is one long-lived application, and the application is the deployment. Under a single supervisor sit the database connection, the PubSub, the bus with its score workers, and the Phoenix endpoint; if one of them crashes, its subtree is restarted in place rather than the machine torn down. The supervision tree from the earlier chapters is, here, the shape of the running service.

There is no ephemeral, scale-to-zero job tier, and that is a deliberate reading of the load. Guesses arrive as a steady stream rather than in rare spikes, and a settlement is a single batch pass at a game’s close, not a fleet of short-lived jobs. A persistent service sized to that load is simpler to reason about than machines that come and go, so the reference design keeps one app running.

It deploys on Fly Machines as that one service, close to its players and its data. Scaling is adding instances of the same supervised tree, not a separate worker fleet, and the bus and its lanes already partition the work across them by branded id. The general treatment of running BCS on Fly — regions, machines, and the rest — is the subject of the next chapter; here it is enough that Codemojex ships as a single, supervised, persistent app.

§4

The doors

the sibling courses
§2

References

sources · related

Sources

Related