Skip to content

Next Level DevOps And Softwarearchitecture Of A Modern Onlinegame - PHPUserGroup Meetup

Mindworks
Jarrestraße 42A
Hamburg

Next Level DevOps By Ole Michaelis

Preliminary Consideration

  • infrastructure is created by feature (but without clean up or cleaning things up)
  • did a practical training round in admin team for half a year

What Is DevOps?

  • you build it, you run it (until it goes offline)
  • monitor it, automate it, measure/metering it
  • build small tools and services to form an api

How Became A DevOp?

  • extend your development skills
  • learn and do refactoring
  • learn the shell
  • learn the operation system
  • pull deployment with deployment hooks

Softwarearchitecture Of A Modern Onlinegame By Tobias Rojahn

Preliminary Consideration/Requirements

  • crossplattform (mobile and web)
  • realtime game (fast information about status changes)
  • multiplayer (user can influence each other)

Architecture

  • user (request websocket from web server)
  • NodeJS (handles websocket connection to redis and global redis)
  • redis (message queue with push and pull)
  • php worker (long living php process, asks webservices or database, are forkable by using php forking mechanism)
  • if something is calculated by the php worker, the message is pushed in the global redis

The PHP Worker

  • long living workers
  • worker is observing the queue (and event handling) and is pushing the message to the dispatcher
  • each message has a type to push to the right controller
  • dispatcher is using the right controller (with a bunch of internal to external mapping and nearly zero logic)
  • controller is pushing the message to the right domain service (using the right domain objects and/or repositories)
  • controller is working with multiple db views
  • domain service can also call the event dispatcher to trigger other systems (not core systems)

Deamon

  • only creates messages
  • just time controlled game events

Cronjob

  • only creates messages

NodeJS

  • socket (via socket io) replaces session
  • add additional data (with indexes to gain speed) to the socket (via message queues from php)
  • node to php: send all data
  • php to node: a combination of data to all connected sockets
  • forwarding of fitting messages (with removing of internal datas)

Testing

  • API-Tests
    • description
    • ingoing message (test data)
    • outgoing message (expectations)
  • based on fitrues
  • only php layer
  • rollback on each test

Trackbacks

Keine Trackbacks

Kommentare

Ansicht der Kommentare: Linear | Verschachtelt

Noch keine Kommentare

Die Kommentarfunktion wurde vom Besitzer dieses Blogs in diesem Eintrag deaktiviert.

Kommentar schreiben

Die angegebene E-Mail-Adresse wird nicht dargestellt, sondern nur für eventuelle Benachrichtigungen verwendet.
Um einen Kommentar hinterlassen zu können, erhalten Sie nach dem Kommentieren eine E-Mail mit Aktivierungslink an ihre angegebene Adresse.

Um maschinelle und automatische Übertragung von Spamkommentaren zu verhindern, bitte die Zeichenfolge im dargestellten Bild in der Eingabemaske eintragen. Nur wenn die Zeichenfolge richtig eingegeben wurde, kann der Kommentar angenommen werden. Bitte beachten Sie, dass Ihr Browser Cookies unterstützen muss, um dieses Verfahren anzuwenden.
CAPTCHA

Markdown-Formatierung erlaubt
Formular-Optionen