Page MenuHomeWildfire Games

Send rating related requests directly to EcheLOn
ClosedPublic

Authored by Dunedan on Dec 26 2017, 1:30 PM.

Details

Summary

Instead of relaying requests to EcheLOn through XpartaMuPP, let 0ad send them to EcheLOn directly. This causes better separation of concerns between XpartaMuPP and EcheLOn and significantly reduces load on XpartaMuPP.

This is a minimal patch as far as XpartaMuPP is concerned, so switching back to relaying requests for EcheLOn through XpartaMuPP is still possible by simply setting the new configuration option to xpartamupp instead of echelon.

Test Plan

Run the patched XpartaMuPP and EcheLOn in a separate lobby and check that all rating related requests still work.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Dunedan created this revision.Dec 26 2017, 1:30 PM
Vulcan added a subscriber: Vulcan.Dec 26 2017, 2:30 PM

Successful build - Chance fights ever on the side of the prudent.

Updating workspaces...
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK!
Checking XML files...
Dunedan updated this revision to Diff 6294.Mar 31 2018, 12:46 PM

Rebased to account for some lobby changes in SVN.

elexis added a subscriber: elexis.Mar 31 2018, 1:07 PM

Does this throw any kind of error if EcheLOn is offline? (Guess not, given how few code this diff changes)

source/tools/XpartaMuPP/EcheLOn.py
573 ↗(On Diff #6294)

sender = iq['gamereport']['sender'] or iq['from']?

In D1177#58260, @elexis wrote:

Does this throw any kind of error if EcheLOn is offline? (Guess not, given how few code this diff changes)

I guess the question is how handling of EcheLOn being offline is with this patch on 0ad-side, as requests from 0ad to EcheLOn were previously forwarded through XpartaMuPP, which had proper handling for EcheLOn being offline, while 0ad might not have such a handling. The answer is pretty simple: User facing behavior of 0ad stays the same with or without this patch. No error is shown to the user if EcheLOn is offline. ?

Itms accepted this revision.Apr 14 2018, 2:50 PM
This revision is now accepted and ready to land.Apr 14 2018, 2:50 PM
This revision was automatically updated to reflect the committed changes.
Owners added a subscriber: Restricted Owners Package.Apr 14 2018, 2:51 PM
Itms added a comment.Apr 14 2018, 2:52 PM

Thanks for the patch!

It seems the converse should be done too, i.e. XpartaMuPP becoming fully agnostic of EcheLOn. I.e. relayProfile, relayBoardList, warnRatingsBotOffline, BoardListXmppPlugin, ProfileXmppPlugin should be moved to EcheLOn.py or deleted.
Where EcheLOn needs to know about gamelist data, it can still obtain it with authentication from the gamelist bot (rather than hardcoding rating vocabulary).
Is this where https://github.com/Dunedan/XpartaMuPP/commits/master/xpartamupp comes into play?