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 , 8 years ago
Owner: | set to |
---|
comment:2 by , 8 years ago
Milestone: | Alpha 21 → Backlog |
---|
comment:3 by , 7 years ago
Keywords: | beta added |
---|
comment:4 by , 7 years ago
Owner: | removed |
---|
comment:5 by , 7 years ago
Priority: | Should Have → Must Have |
---|
Getting performance bottlenecks because multicasting via iterating through all recipients on the client side is not efficient.
comment:6 by , 7 years ago
Milestone: | Backlog → Alpha 22 |
---|
Lately the lobby is often unusable because it is too slow when lots of players are online (100+).
comment:7 by , 7 years ago
XEP-60
- supported by gloox: https://camaya.net/gloox/features/
- specs: https://xmpp.org/extensions/xep-0060.html
comment:8 by , 7 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:10 by , 7 years ago
Owner: | removed |
---|---|
Status: | assigned → new |
comment:11 by , 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).
comment:14 by , 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 andprofile
requests stays the same - requests for
getratinglist
andgetleaderboard
need to be removed (those will be automatically published via PubSub, as well as updates togamelist
) - 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 methodsgetSubscriptions()
andsubscribe()
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 datahandleIQ()
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 usegit+https://github.com/Dunedan/lobby-bots@pubsub
as source for XpartaMuPP and EcheLOn - optional: adjust
roles/lobby_bots/templates/echelon-systemd.service.j2
androles/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
Backlogging due to lack of progress.