Dev Log Week 2024-35: Sleight of hand

Week 35 was a good one, at least in terms of actual progress measured in code :smiley:

I continued to work on the DS integration which I’ve been mentioning a lot recently. The goal at the moment is to hide the current-generation ORS behind an abstraction that allows me to switch out the implementation by flipping a switch, more or less.

And this “trick” actually already works now: I have built a very simple mock-up of the DS behind said new abstraction and now both (automatic) traffic distribution and (manual) ORS queries “work” after merely setting a configuration parameter from ors to ds.

The term “work” is a bit of a stretch here, of course: Inventories are faked, fares don’t exist yet and there’s only a single hard-coded travel request per destination. BUT having this in place is super important for several reasons:

Firstly, it prevents me from building stuff in the ivory tower, detached from reality, never getting finished. The new code has to work with the existing system at all times and this new mock is, in fact, already deployed to our staging and soon to our production game worlds, all while the ORS continues to do the actual work.

Secondly, it ensures we have a migration path from the old to the new system, keeping full control over whether, when and how we flip the switch.

Thirdly, it will allow me to start testing with real players and data early on, basically as soon as there’s enough meat on the bone to actually receive sensible bookings. I might reach this point over the next few weeks already, in which case I’ll look into ways a broader preview/test could be facilitated.

I had a whole section drafted on refactoring and on how static code is bad , but I figure the above is both enough and more interesting to you :wink:

3 Likes