Fixtures Push v2

Table of Contents

Description

Fixtures Push API v2 is a pub/sub or message queue mechanism for distributing updates in real time. The produced contracts are described in the Read Data Points section of each document under the Domain Entities document.

Fixture push v2 uses the same contracts as Fixtures API v2, thus the API Swagger is also relevant for the push users to get a good understanding of the models they need. If going for the swagger take the /GET methods and see all “{Entity}ResponseModel” - e.g. FixtureResponseModel, CompetitionResponseModel etc.

Architecture

The Fixtures Push API v2 has a simple architecture that listens for updates made in the Fixtures platform and then publishes them to a third-party real-time provider called Ably for consumption from the subscribers/consumers of the specific channels/queue.

Ably basically provide 2 options for the consumption of the messages.

Pub/Sub

Read more about it here: https://ably.com/docs/key-concepts

Firehose Message queue

Read more about it here: https://ably.com/docs/general/firehose

How to choose between both options

  • Pub/Sub is less fault tolerant, it only has 2 minutes of a window to keep to messages in client is not listening - the good news is that what is missed can be from ably history api up to 72h.

  • Pub/Sub. Getting what is missed from the history API makes the overall integration a bit more complex

  • Pub/Sub. Another option to get what is missed to bootstrap from Fixtures API v2

  • Pub/Sub requires the client to use the whole channel to subscribe to e.g. Fixtures.10.19 - this subscribes to football fixtures only for the Champions league

  • Firehose is fault tolerant by design as provide mechanisms to ensure reliable delivery, even in the presence of failures or intermittent connectivity issues

  • Firehose requires provisioning of infrastructure on the client which is connected by the Genius Sports team - however, this makes the solution more costly

  • Firehose can have wildcards on a subscription base thus having an integration Fixtures.10.* for all football fixtures, or even for all fixtures - Fixtures.*.*
    Furthermore, this feature can have the significant benefit of reducing the complexity on the client by also supporting regex expressions, so if we assume that the client is interested only in a few specific entities for some concrete sports it can be easily achieved - (Competitions|Fixtures).(10|17).* will account for all competition and fixtures entities for Football and American Football.

Channels

The table below show all the channels to which a consumer can be subscribed and what is the granularity. Next to the name is a link where the contract for the changes could be found.

Channel name

Contract published

Description

Channel name

Contract published

Description

Localities

Locality | Read Data Points

What is Locality? The locality entity has different meaning in different context:

  • For Fixture, Round, Season and Competition it defines the place where the entity will be held at.

  • For Competitor and Person it defines the nationality of the real-life Competitor/Person.

  • For Venue it defines the location of the venue in the real world.

Organizations

Organization | Read Data Points

An Organization is representation of a real-life organization like the “NCAA” in the USA. It groups multiple Competitions within multiple Sports.

Venues

Venue | Read Data Points

The venue entity defines different things in different context:

  • For Fixture, Round, Season, Competition: the place where the fixture take place

  • For Team: It defines the home venue of it

Persons

Person | Read Data Points

Person is a representation of a real-life person

Players.{sportId}

https://geniussports.atlassian.net/wiki/spaces/OTF/pages/3976890114/Player+Competitor#Read-Data-Points

For this channel the consumer can subscribe directly to players which are part of specific sport by simply specifying the id of the sport in the channel’s name. e.g.: If you only want Tennis Players you can specify channel name: Players.24.

Teams.{sportId}

Person | Read Data Points

For this channel the consumer can subscribe directly to teams which are part of specific sport by simply specifying the id of the sport in the channel’s name. e.g.: If you only want Football Teams you can specify channel name: Teams.10.

Doubles.{sportId}

Person | Read Data Points

For this channel the consumer can subscribe directly to doubles which are part of specific sport by simply specifying the id of the sport in the channel’s name. e.g.: If you only want Tennis Doubles you can specify channel name: Doubles.24.

Contracts.{sportId}.{competitorId}

Person | Read Data Points

For this channel the consumer can subscribe directly to contracts which are part of specific sport and attached to specific competitor by simply specifying the id of the sport and the id of the competitor in the channel’s name. e.g.: If you only want Football Contracts for Barcelona you can specify channel name: Contracts.10.93471.

Competitions.{sportId}.{competitionId}

Person | Read Data Points

For this channel the consumer can subscribe directly to competitions which are part of specific sport by simply specifying the id of the sport and the competition id in the channel’s name. e.g.: If you only want Football Champions League Competition you can specify channel name: Competitions.10.19.

Seasons.{sportId}.{competitionId}

Person | Read Data Points

For this channel the consumer can subscribe directly to seasons which are part of specific sport and specific competition by simply specifying the id of the sport and the competition id in the channel’s name. e.g.: If you only want Football Champions League Seasons you can specify channel name: Seasons.10.19.

Rounds.{sportId}.{competitionId}

Person | Read Data Points

For this channel the consumer can subscribe directly to rounds which are part of specific sport and specific competition by simply specifying the id of the sport and the competition id in the channel’s name. e.g.: If you only want Football Champions League Rounds you can specify channel name: Rounds.10.19.

Fixtures.{sportId}.{competitionId}

Person | Read Data Points

For this channel the consumer can subscribe directly to fixtures which are part of specific sport and specific competition by simply specifying the id of the sport and the competition id in the channel’s name. e.g.: If you only want Football Champions League Fixtures you can specify channel name: Fixtures.10.19.

SeasonCompetitors.{sportId}.{competitionId}

https://geniussports.atlassian.net/wiki/spaces/BID/pages/4447469885/Season+Competitor#Read-Data-Points

For this channel the consumer can subscribe directly to season competitors which are part of specific sport and specific competition by simply specifying the id of the sport and the competition id in the channel’s name. e.g.: If you only want Football Champions League Season Competitors you can specify channel name: SeasonCompetitors.10.19.

RoundCompetitors.{sportId}.{competitionId}

https://geniussports.atlassian.net/wiki/spaces/BID/pages/4447469885/Round+Competitor#Read-Data-Points

For this channel the consumer can subscribe directly to round competitors which are part of specific sport and specific competition by simply specifying the id of the sport and the competition id in the channel’s name. e.g.: If you only want Football Champions League Round Competitors you can specify channel name: RoundCompetitors.10.19.