EDCD / EDDN

EDDN - Elite: Dangerous Data Network
https://eddn.edcd.io/
BSD 3-Clause "New" or "Revised" License
298 stars 59 forks source link

Schemas/gameversion: Document denoting Live versus Legacy for CAPI data #201

Closed Athanasius closed 1 year ago

Athanasius commented 1 year ago

With Update 14 there are now two CAPI servers:

As such any EDDN Sender using CAPI-sourced data can know which galaxy it is for.

Thus it is proposed to update the documentation for gameversion to mandate that CAPI-sourced data use a string of the form CAPI-<galaxy>-<endpoint>, e.g.:

This format allows Listeners to, for example:

  1. Check for leading CAPI-, and if found.
  2. Split the string on - and utilise the 2nd and 3rd components.

If you have a good reason why your code wouldn't be able to keep track of the galaxy it queried data from, and thus you need to continue with CAPI-<endpoint> make your case now. Obviously listeners will at least need to cope with such enough to discard the data if they so choose.

bgol commented 1 year ago

Why not keep the gameversion like it is and define the Live/Legacy with the gamebuild? ... "gameversion": "CAPI-market", "gamebuild": "Live" ...

Athanasius commented 1 year ago

Why not keep the gameversion like it is and define the Live/Legacy with the gamebuild? ... "gameversion": "CAPI-market", "gamebuild": "Live" ...

Given gamebuild doesn't carry any useful information for CAPI-sourced data I can see why that seems a good suggestion.

Listeners, do you have any preference? You might be parsing into gameversion anyway if it starts CAPI-, but on the other hand a quick check on if gamebuild == "Live" ... might be easier ?

robbyxp1 commented 1 year ago

I'm happy with the gameversion only "CAPI-Live-market" format.

Tkael commented 1 year ago

My preference would be to leave the live gameversion data string as is, e.g.

CAPI-market - CAPI-sourced data for the Live galaxy, from the /market endpoint.

CAPI-Legacy-market - CAPI-sourced data for the Legacy galaxy, from the /market endpoint.

Changing the live string adds an unnecessary complication in my opinion. And may leave us a little less prepared for any future additional galaxy splits.

Athanasius commented 1 year ago

My preference would be to leave the live gameversion data string as is, e.g.

CAPI-market - CAPI-sourced data for the Live galaxy, from the /market endpoint.

CAPI-Legacy-market - CAPI-sourced data for the Legacy galaxy, from the /market endpoint.

Changing the live string adds an unnecessary complication in my opinion. And may leave us a little less prepared for any future additional galaxy splits.

The problem with that is then a Listener can't tell if CAPI-market is because a Sender had set that up before the change and just not thought to change it after adding support for the Legacy CAPI server. A wholesale change for Live versus Legacy makes it crystal clear if they have or not.

  1. CAPI-market - an initial implementation, not updated. Could possibly be either galaxy, if the Sender added support for the alternate Legacy host.
  2. CAPI-Live-market - updated for this change, Live galaxy.
  3. CAPI-Legacy-market - updated for this change, Legacy galaxy.

Yes, it's a corner case, but one worth keeping in mind.

Always denoting the source galaxy also means no ambiguity if quickly looking at this (unlike the game launcher where I see some people are confused as to which "Elite Dangerous: Horizons" is due to the UI/UX not necessarily also showing "Legacy Horizons" at the same time).

Athanasius commented 1 year ago

From Discord:

Anthor (EDSM/SCIM): I'll say that enforcing Live makes sure that it's not a default old value Anthor (EDSM/SCIM): So I'm up for CAPI-{Live|Legacy}-{Market|Shipyard}

Artie (Inara): same here, up for CAPI-Live and CAPI-Legacy

Athanasius commented 1 year ago

Athanasius (EDMC, EDDN): I don't envisage Spansh or themroc differing in their assessment, but they have until tomorrow to pipe up (they haven't on the github issue yet either). Spansh: I'm good with it

So that leaves only @themroc5 out of the major Listeners. Unless there's a justified objection by tomorrow morning I'll start work then on a PR to update the documentation for the CAPI-<Live|Legacy>-<endpoint> scheme.

Athanasius commented 1 year ago

TL;DR - I'm 99.9% confident that the CAPI split is functioning as intended. Only Legacy data on the legacy host, only Live data on the live host.

I've just updated https://github.com/Athanasius/fd-api to support the legacy server, and testing with that (where I know there's a difference for me after making some changes in-game for Legacy) shows that indeed the correct servers are showing the correct data.

I've not explicitly checked that where, e.g. a station has different state in-game between galaxy versions, that definitely shows up correctly in CAPI data. Might be possible to 'easily' do with a station that's still dockable but is affected by the Thargoid invasion, but otherwise it'd take running two game clients and being very fast to ensure an observed in-game difference should be in CAPI data, and confirming it is.

Athanasius commented 1 year ago

Updated doc currently available at https://github.com/EDCD/EDDN/blob/fix/201/eddn-capi-denote-live-vs-legacy/docs/Developers.md#gameversions-and-gamebuild

I'll merge that through to live in about an hour unless anyone has suggested edits.

Athanasius commented 1 year ago

Merged ->develop -> master -> live.