Changes between Initial Version and Version 1 of Ticket #4203, comment 14


Ignore:
Timestamp:
Apr 23, 2023, 3:10:33 PM (13 months ago)
Author:
Stan

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4203, comment 14

    initial v1  
    1 I just finished a pull request implementing PubSub for the lobby bots. You can find it here: https://github.com/0ad/lobby-bots/pull/20
     1I just finished a pull request implementing !PubSub for the lobby bots. You can find it here: https://github.com/0ad/lobby-bots/pull/20
    22
    33What's now still missing is adjusting Pyrogenesis to use it. Doing so should be pretty straight-forward:
    44
    55- handling for sending `gamelist` requests for hosted games and `profile` requests stays the same
    6 - requests for `getratinglist` and `getleaderboard` need to be removed (those will be automatically published via PubSub, as well as updates to `gamelist`)
    7 - upon connecting to the XMPP server pyrogenesis needs to check whether it's already subscribed to the three PubSub nodes `0ad#{room_name}#gamelist#v1`, `0ad#{room_name}#boardlist#v1`, `0ad#{room_name}#ratinglist#v1` and subscribe if that's not the case. This can be done using the PubSub Manager methods `getSubscriptions()` and `subscribe()` already present in gloox: https://camaya.net/api/gloox-1.0.26/classgloox_1_1PubSub_1_1Manager.html
    8 - instead of expecting the list of games, the boardlist and the ratinglist from XpartaMuPP/EcheLOn they will now be sent by `pubsub.{domain}` and are wrapped in the XML structure necessary for PubSub. The actual stanzas stay the same. For handling such data `handleIQ()` method of the PubSub Manager should do the trick
     6- requests for `getratinglist` and `getleaderboard` need to be removed (those will be automatically published via !PubSub, as well as updates to `gamelist`)
     7- upon connecting to the XMPP server pyrogenesis needs to check whether it's already subscribed to the three !PubSub nodes `0ad#{room_name}#gamelist#v1`, `0ad#{room_name}#boardlist#v1`, `0ad#{room_name}#ratinglist#v1` and subscribe if that's not the case. This can be done using the !PubSub Manager methods `getSubscriptions()` and `subscribe()` already present in gloox: https://camaya.net/api/gloox-1.0.26/classgloox_1_1PubSub_1_1Manager.html
     8- instead of expecting the list of games, the boardlist and the ratinglist from XpartaMuPP/EcheLOn they will now be sent by `pubsub.{domain}` and are wrapped in the XML structure necessary for !PubSub. The actual stanzas stay the same. For handling such data `handleIQ()` method of the !PubSub Manager should do the trick
    99
    1010For testing the Vagrant VM provided by https://github.com/0ad/lobby-infrastructure/ can be used, using the following steps:
    1111
    1212- adjust `lobby-config.yml` to use `git+https://github.com/Dunedan/lobby-bots@pubsub` as source for XpartaMuPP and EcheLOn
    13 - optional: adjust `roles/lobby_bots/templates/echelon-systemd.service.j2` and `roles/lobby_bots/templates/xpartamupp-systemd.service.j2` and add the additional parameter `--disable-legacy-lists` to disable sending of the pre-PubSub messages
     13- optional: adjust `roles/lobby_bots/templates/echelon-systemd.service.j2` and `roles/lobby_bots/templates/xpartamupp-systemd.service.j2` and add the additional parameter `--disable-legacy-lists` to disable sending of the pre-!PubSub messages
    1414- start and connect with 0ad to the Vagrant VM as documented in the `lobby-infrastructure` README