Opened 8 years ago

Last modified 12 months ago

#4203 new enhancement

Implement PubSub (XEP-0060) for GameList, and BoardList

Reported by: scythetwirler Owned by:
Priority: Must Have Milestone: Backlog
Component: Multiplayer lobby Keywords: beta
Cc: Patch:

Description

XpartaMuPP should publish gameList and ratingList on a node and users should be subscribed to the node.

Change History (14)

comment:1 by scythetwirler, 8 years ago

Owner: set to Josh

comment:2 by elexis, 8 years ago

Milestone: Alpha 21Backlog

Backlogging due to lack of progress.

comment:3 by scythetwirler, 7 years ago

Keywords: beta added

comment:4 by scythetwirler, 7 years ago

Owner: Josh removed

comment:5 by scythetwirler, 7 years ago

Priority: Should HaveMust Have

Getting performance bottlenecks because multicasting via iterating through all recipients on the client side is not efficient.

comment:6 by echotangoecho, 7 years ago

Milestone: BacklogAlpha 22

Lately the lobby is often unusable because it is too slow when lots of players are online (100+).

comment:8 by echotangoecho, 7 years ago

Owner: set to echotangoecho
Status: newassigned

comment:9 by elexis, 7 years ago

Milestone: Alpha 22Backlog

Backlogging due to lack of progress

comment:10 by echotangoecho, 7 years ago

Owner: echotangoecho removed
Status: assignednew

comment:11 by Dunedan, 6 years ago

Another reason apart from performance to use PubSub is that the current IQ-query based interactions don't comply with the XMPP standard. IQ-queries are a request/response-based mechanism, but are used as single-way information-push mechanism by 0ad (e.g. for pushing the gamelist to all players on update).

Last edited 12 months ago by Stan (previous) (diff)

comment:12 by elexis, 5 years ago

Wouldn't this also fix #5337?

Last edited 5 years ago by elexis (previous) (diff)

comment:13 by Dunedan, 5 years ago

Yes, it would.

comment:14 by Dunedan, 12 months ago

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

What's now still missing is adjusting Pyrogenesis to use it. Doing so should be pretty straight-forward:

  • handling for sending gamelist requests for hosted games and profile requests stays the same
  • requests for getratinglist and getleaderboard need to be removed (those will be automatically published via PubSub, as well as updates to gamelist)
  • 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
  • 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

For testing the Vagrant VM provided by https://github.com/0ad/lobby-infrastructure/ can be used, using the following steps:

  • adjust lobby-config.yml to use git+https://github.com/Dunedan/lobby-bots@pubsub as source for XpartaMuPP and EcheLOn
  • 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
  • start and connect with 0ad to the Vagrant VM as documented in the lobby-infrastructure README
Last edited 12 months ago by Stan (previous) (diff)
Note: See TracTickets for help on using tickets.