SlideShare a Scribd company logo
Georgii Korshunov & Krzysztof Sobczak
Software Engineers at Gwent
Webservices
Versioning challenges in micro services of
Versioning challenges in micro services of Gwent
When should you
begin API versioning?
How long should you
avoid API versioning ?
GWENT webservices – GOG
COVERED PARTS:
• MICROTRANSACTIONS
• LEADERBOARDS
• MULTIPLAYER COMPONENTS
• PLAYER’S PROFILES
• CARD COLLECTIONS
• REWARDS AND ACHIEVEMENTS
Our beginning
• Only one game version NO VERSIONING
Introducing new game version
• Logic changes synced with „fast” game update
• Backwards compatibility
NO VERSIONING
Supporting old game versions
VERSIONING REQUIRED• Requirement to support multiple logic paths
Versioning challenges in micro services of Gwent
Summary
• Convenient way of rolling out new game versions
REASONS FOR VERSIONING
• Supporting old versions with different business logic
• Protecting access to old/new features
API versioning
Microservices versioning
Independent versions per
service
_version=3
_version=1,_version=3,
…
Global version
Microservices communication
Background tasks
Interface
http://service.gog.com/v2/endpoint?param=value
http://service.gog.com/endpoint?param=value
Accept: application/vnd.gog.service+json; version=2.0
X-Api-Version: 2
http://service.gog.com/endpoint?param=value&_version=2
Path
Header
Query
Microservices communication
Synchronous — HTTP calls
http://service.gog.com/endpoint?param=value&_version=3
Asynchronous — AMQP messages
Implementation
Routing helper
class UserController extends Controller
{
public function getAction($userId)
{}
_version=1
_version>=2 public function getAction_2($userId)
{}
Implementation
Strategy class with semanthic methods
class ApiVersionStrategy
{
public function hasNewCardNames()
{
return $this->version >= 3;
}
Dropping support for old versions
• Drop support for old version ASAP
• Forbid requests with old versions
• Remove code and tests
Data versioning
Data versioning
Data versioning
Data versioning
• API is not changing
• There are several versions of data
• Data versions are used by different versions of client
Microservice communication
Interface
http://service.gog.com/endpoint?_data_version=2
Query param
Implementation
Implementation
• Duplicate tables of versioned entities for each version
• Table names depend on current data version
• Foreign keys are duplicated too
• Except for foreign keys from unversioned to versioned data
Implementation
• Data version is a request parameter
• Hook into Doctrine metadata loader to change tablenames
• Hook into Doctrine metadata cache loader
Other usages — Rankings
Other usages — Rankings
Supporting
• New data versions: per-user privileges
• Old data versions: forbidding access
• Active data versions: readonly for data safety
Game Servers orchestration
Game server versions
Game servers
Game Server – Multiplayer
• Data version
• Game version
Registered version includes:
Additional server data:
• Maximum number of players
Server management
Server Agent - deamon
Server Agent
• Updates server state through HTTP
MANAGEMENT
• Registers the server in a server manager
• Sends commands to server process with bash
github.com: yohang/finite
• Uses state machine for bullet proof state transitions
• States include: starting, running, graceful-stopping, stopped, updating etc.
Server Manager
• Provides current tasks for each servers
• HTTP RESTful service
• Analyzes current server requirements and spawns tasks for servers
VERSION
MANAGER
COORDINATOR
• Handles server registration & state updates
• Background process
• Notifies about not enough servers in the pool
• Capable of auto-scaling based on the game servers usage by
players
Server Manager
• Manager spawns minimum number of servers
• Human defines minimum/maximum number of servers per game version
• Manager adjusts number of servers to cover current load
SERVER PROVISIONING
Tests & Monitoring
Our stack
CHARTS - GRAFANA
METRICS - TELEGRAF
LOGS - KIBANA
CHECKS - ICINGA
BOTS WITH UI
HEADLESS BOTS
DEV TESTS - DOCKER
MULTIPLE TESTING ENVS
Game release monitoring
Upgrade started Crossed half
(players on game servers by game version)
Chart alerts
game version A
game version B
Alerting state Recovery state
Questions?
Join us!

More Related Content

What's hot (20)

PDF
Diablo keystone
OpenCity Community
 
PPTX
Microsoft Azure and Windows Application monitoring
Site24x7
 
PDF
HCL Nomad for Admins - ENG
Ales Lichtenberg
 
PPTX
Liberty Deep Dive
WASdev Community
 
PDF
Monitoring Node.js Microservices on CloudFoundry with Open Source Tools and a...
Tony Erwin
 
PDF
What's new in MySQL 5.5? FOSDEM 2011
Lenz Grimmer
 
PDF
To Kill a Monolith: Slaying the Demons of a Monolith with Node.js Microservic...
Tony Erwin
 
PDF
One daytalk hbraun_oct2011
hbraun
 
PDF
Reliable System Integration and Scaling with WSO2 Message Broker
WSO2
 
PDF
WordPress Workflows
Phill Brown
 
PPTX
70-412 Objectives
pupeadra
 
PDF
SAP LVM Post Copy Automation Integration
Aliter Consulting
 
PDF
WSO2 API Manager Reference Architecture for Pivotal Cloud Foundry
Imesh Gunaratne
 
PDF
be the captain of your connections deployment
Sharon James
 
PPTX
Database and Public Endpoints redundancy on Azure
Radu Vunvulea
 
PPTX
Mumbai MuleSoft Meetup 11
Akshata Sawant
 
PPT
Mule compatible technologies
himajareddys
 
PPTX
Java in the cloud with Jelastic
jkops78
 
PPTX
VMware Monitoring-Discover And Monitor Your Virtual Environment
Site24x7
 
PDF
Building a company-wide data pipeline on Apache Kafka - engineering for 150 b...
LINE Corporation
 
Diablo keystone
OpenCity Community
 
Microsoft Azure and Windows Application monitoring
Site24x7
 
HCL Nomad for Admins - ENG
Ales Lichtenberg
 
Liberty Deep Dive
WASdev Community
 
Monitoring Node.js Microservices on CloudFoundry with Open Source Tools and a...
Tony Erwin
 
What's new in MySQL 5.5? FOSDEM 2011
Lenz Grimmer
 
To Kill a Monolith: Slaying the Demons of a Monolith with Node.js Microservic...
Tony Erwin
 
One daytalk hbraun_oct2011
hbraun
 
Reliable System Integration and Scaling with WSO2 Message Broker
WSO2
 
WordPress Workflows
Phill Brown
 
70-412 Objectives
pupeadra
 
SAP LVM Post Copy Automation Integration
Aliter Consulting
 
WSO2 API Manager Reference Architecture for Pivotal Cloud Foundry
Imesh Gunaratne
 
be the captain of your connections deployment
Sharon James
 
Database and Public Endpoints redundancy on Azure
Radu Vunvulea
 
Mumbai MuleSoft Meetup 11
Akshata Sawant
 
Mule compatible technologies
himajareddys
 
Java in the cloud with Jelastic
jkops78
 
VMware Monitoring-Discover And Monitor Your Virtual Environment
Site24x7
 
Building a company-wide data pipeline on Apache Kafka - engineering for 150 b...
LINE Corporation
 

Similar to Versioning challenges in micro services of Gwent (20)

PPT
Puppet at DemonWare - Ruaidhri Power - Puppetcamp Dublin '12
Puppet
 
PPTX
Microservices service versioning (By Dmytro Brazhnyk)
Katherine Golovinova
 
PDF
Jee conf 2015
Maciek Próchniak
 
PDF
How_to_build_GameServer_2
Peter Rybar
 
PDF
Choosing your Game Engine (2009)
Mark DeLoura
 
PPTX
The Core of Microservice Architecture(First Approach)
enyert
 
PDF
Scaling Gilt: from Monolithic Ruby Application to Distributed Scala Micro-Ser...
C4Media
 
PPTX
Drupal RPG - A Backend Server Story
Eladio Jose Abquina
 
PDF
Create a PHP Library the right way
Christian Varela
 
PDF
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
Arun Gupta
 
PPTX
Continuous integration for open source distros v 3.0
Sriram Narayanan
 
PDF
OSGi & Java EE in GlassFish @ Silicon Valley Code Camp 2010
Arun Gupta
 
PDF
OSGi & Java EE in GlassFish - Best of both worlds
Arun Gupta
 
PDF
Symfony in microservice architecture
Daniele D'Angeli
 
PDF
Zend Server: A Guided Tour
Shahar Evron
 
PDF
An introduction to OSGi
Andrea Chiodoni
 
PPTX
Flex and PHP For the Flash Folks
10n Software, LLC
 
ODP
Mcollective introduction
Javier Turégano Molina
 
PPTX
Web Service Versioning
Ignaz Wanders
 
PDF
Ignite Devops Fast Moving Software
SpamapS
 
Puppet at DemonWare - Ruaidhri Power - Puppetcamp Dublin '12
Puppet
 
Microservices service versioning (By Dmytro Brazhnyk)
Katherine Golovinova
 
Jee conf 2015
Maciek Próchniak
 
How_to_build_GameServer_2
Peter Rybar
 
Choosing your Game Engine (2009)
Mark DeLoura
 
The Core of Microservice Architecture(First Approach)
enyert
 
Scaling Gilt: from Monolithic Ruby Application to Distributed Scala Micro-Ser...
C4Media
 
Drupal RPG - A Backend Server Story
Eladio Jose Abquina
 
Create a PHP Library the right way
Christian Varela
 
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
Arun Gupta
 
Continuous integration for open source distros v 3.0
Sriram Narayanan
 
OSGi & Java EE in GlassFish @ Silicon Valley Code Camp 2010
Arun Gupta
 
OSGi & Java EE in GlassFish - Best of both worlds
Arun Gupta
 
Symfony in microservice architecture
Daniele D'Angeli
 
Zend Server: A Guided Tour
Shahar Evron
 
An introduction to OSGi
Andrea Chiodoni
 
Flex and PHP For the Flash Folks
10n Software, LLC
 
Mcollective introduction
Javier Turégano Molina
 
Web Service Versioning
Ignaz Wanders
 
Ignite Devops Fast Moving Software
SpamapS
 
Ad

More from GOG.com dev team (16)

PDF
In-depth caching in Varnish - GOG Varnish Meetup, march 2019
GOG.com dev team
 
PDF
Always up to date, testable and maintainable documentation with OpenAPI
GOG.com dev team
 
PDF
Symfony without the framework
GOG.com dev team
 
PPTX
Przetwarzanie rozproszone z wykorzystaniem komunikacji asynchronicznej w grze...
GOG.com dev team
 
PDF
GWINT: Przetwarzanie rozproszone z wykorzystaniem komunikacji asynchronicznej...
GOG.com dev team
 
PDF
Event sourcing w PHP (by Piotr Kacała)
GOG.com dev team
 
PDF
Jak wydaliśmy wiedźmina, GOG.com IT
GOG.com dev team
 
PDF
Dystrybucja gier w świecie online, przykład architektury webowego systemu ro...
GOG.com dev team
 
PDF
Wykorzystanie technologii webowych w aplikacjach desktopowych (1)
GOG.com dev team
 
PDF
Design Thinking Workshop: Empathy in the User Experience
GOG.com dev team
 
PDF
Lean UX - How to start with Lean Startup in User Experience
GOG.com dev team
 
PDF
Varnish cache
GOG.com dev team
 
PDF
Czym jest złożoność ?
GOG.com dev team
 
PDF
Intro do Domain Driven Design. ( PL )
GOG.com dev team
 
PDF
The story of GOG.com Cache - 4developers 2014 ( PL )
GOG.com dev team
 
PDF
The story of GOG.com Cache - PHPers 2014 ( PL )
GOG.com dev team
 
In-depth caching in Varnish - GOG Varnish Meetup, march 2019
GOG.com dev team
 
Always up to date, testable and maintainable documentation with OpenAPI
GOG.com dev team
 
Symfony without the framework
GOG.com dev team
 
Przetwarzanie rozproszone z wykorzystaniem komunikacji asynchronicznej w grze...
GOG.com dev team
 
GWINT: Przetwarzanie rozproszone z wykorzystaniem komunikacji asynchronicznej...
GOG.com dev team
 
Event sourcing w PHP (by Piotr Kacała)
GOG.com dev team
 
Jak wydaliśmy wiedźmina, GOG.com IT
GOG.com dev team
 
Dystrybucja gier w świecie online, przykład architektury webowego systemu ro...
GOG.com dev team
 
Wykorzystanie technologii webowych w aplikacjach desktopowych (1)
GOG.com dev team
 
Design Thinking Workshop: Empathy in the User Experience
GOG.com dev team
 
Lean UX - How to start with Lean Startup in User Experience
GOG.com dev team
 
Varnish cache
GOG.com dev team
 
Czym jest złożoność ?
GOG.com dev team
 
Intro do Domain Driven Design. ( PL )
GOG.com dev team
 
The story of GOG.com Cache - 4developers 2014 ( PL )
GOG.com dev team
 
The story of GOG.com Cache - PHPers 2014 ( PL )
GOG.com dev team
 
Ad

Recently uploaded (20)

PDF
Researching The Best Chat SDK Providers in 2025
Ray Fields
 
PPTX
Machine Learning Benefits Across Industries
SynapseIndia
 
PPTX
The Future of AI & Machine Learning.pptx
pritsen4700
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PDF
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
PPTX
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
PDF
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 
PPTX
Agentic AI in Healthcare Driving the Next Wave of Digital Transformation
danielle hunter
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PDF
Generative AI vs Predictive AI-The Ultimate Comparison Guide
Lily Clark
 
PPTX
python advanced data structure dictionary with examples python advanced data ...
sprasanna11
 
PPTX
Agile Chennai 18-19 July 2025 | Workshop - Enhancing Agile Collaboration with...
AgileNetwork
 
PDF
Build with AI and GDG Cloud Bydgoszcz- ADK .pdf
jaroslawgajewski1
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PPTX
Earn Agentblazer Status with Slack Community Patna.pptx
SanjeetMishra29
 
PDF
Market Insight : ETH Dominance Returns
CIFDAQ
 
PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PDF
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
PPTX
Using Google Data Studio (Looker Studio) to Create Effective and Easy Data Re...
Orage Technologies
 
Researching The Best Chat SDK Providers in 2025
Ray Fields
 
Machine Learning Benefits Across Industries
SynapseIndia
 
The Future of AI & Machine Learning.pptx
pritsen4700
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 
Agentic AI in Healthcare Driving the Next Wave of Digital Transformation
danielle hunter
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
Generative AI vs Predictive AI-The Ultimate Comparison Guide
Lily Clark
 
python advanced data structure dictionary with examples python advanced data ...
sprasanna11
 
Agile Chennai 18-19 July 2025 | Workshop - Enhancing Agile Collaboration with...
AgileNetwork
 
Build with AI and GDG Cloud Bydgoszcz- ADK .pdf
jaroslawgajewski1
 
The Future of Artificial Intelligence (AI)
Mukul
 
Earn Agentblazer Status with Slack Community Patna.pptx
SanjeetMishra29
 
Market Insight : ETH Dominance Returns
CIFDAQ
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
Using Google Data Studio (Looker Studio) to Create Effective and Easy Data Re...
Orage Technologies
 

Versioning challenges in micro services of Gwent

Editor's Notes

  • #2: Jako GOG.com jesteśmy firmą działającą w przemyśle growym
  • #5: Ogólny model komunikacji asynchronicznej
  • #6: Ogólny model komunikacji asynchronicznej
  • #8: Ogólny model komunikacji asynchronicznej
  • #9: Ogólny model komunikacji asynchronicznej
  • #10: Ogólny model komunikacji asynchronicznej
  • #11: Ogólny model komunikacji asynchronicznej
  • #14: Services updated independently Client AND Services only has to know one version number Introducing new version we make sure stuff is compatible Fallback allows for not updating other services
  • #15: Protocol+Client composer repositories Microservices: passing API version in messages & calls Testing with integration tests (which we don’t have!)
  • #16: No client request = no known version -> save last used user version Possibility to lock user version, disallow downgrading
  • #17: Query because: versioning is optional, backward compatible, visible in access logs, easy to debug Not path because: path describes entity Not header because: proxies, HTTP cache, hacky, hard to debug
  • #18: Microservices communication: passing API version in messages & calls (generic message envelope in async, context generation)
  • #19: Automatically choose controller action with fallback
  • #20: Semantic strategy class methods for enabling features, selecting code paths or for factories
  • #21: Dropping support for old API versions: denying, removing versioning;
  • #23: Diagram for game versions with different data
  • #24: Diagram for game versions with different data
  • #26: Passing around in messages & calls, background processes
  • #27: Query parameter
  • #28: Versioned and unversioned entities, duplicated tables, foreign keys lost and retained Doctrine mappings switch realtime, doctrine metadata cache User -> Versioned — manual consistency
  • #29: Versioned and unversioned entities, duplicated tables, foreign keys lost and retained Doctrine mappings switch realtime, doctrine metadata cache Updating schema challenges
  • #30: Versioned and unversioned entities, duplicated tables, foreign keys lost and retained Doctrine mappings switch realtime, doctrine metadata cache Updating schema challenges
  • #31: Rankings
  • #32: Rankings
  • #33: Unit & integration tests for logic, only QA tests for data Privileges, locking from editing; removing old DV
  • #36: Active servers on the left Servers in the pool on the right
  • #37: Ogólny model komunikacji asynchronicznej
  • #38: Ogólny model komunikacji asynchronicznej
  • #39: PHP long running process -> Leszek Krupiński presentation
  • #40: PHP long running process -> Leszek Krupiński presentation
  • #44: Unit + functional tests for checking the logic on multiple api/data versions Isolated, allows to check if all the services integrate properly with each other Independent client which checks services API responses all the time Native game client configured to follow predefined scenarios and check for correct behavior of webservices As it has high hardware requirements we cannot run too much of them Native game client – just missing the UI part Thanks too much lower requirements we can run hordes of them (dozens of thousands) to even make internal stress tests
  • #45: Ogólny model komunikacji asynchronicznej
  • #46: Ogólny model komunikacji asynchronicznej
  • #48: A lot of logos: Gwent, Cyberpunk, Witcher, etc