Not logged inOpenClonk Forum
Up Topic General / General / Outsourcing the league to Clonkspot
- - Date 2014-04-20 15:08
Parent - - By Newton [th] Date 2014-04-19 09:11
It just came to my mind: Wouldn't it be best to have the CR and OC league on clonkspot?
Parent - - By Luchs [de] Date 2014-04-19 13:15
The league code doesn't support this yet, though. Without code changes, we'd need to run two separate leagues on clonkspot, too.
Parent - - By Newton [th] Date 2014-04-19 13:27
It should support it. You sure it doesn't work?
Parent - - By Luchs [de] Date 2014-04-19 14:37
Well, have a look at the commits I reverted in the "cr" branch:

- 7abea47 remove hardcoded clonk.de link for runtime join/direct join from browser (openclonk does not register an url protocol for itself)
- 1c24854 internationalization: send unlocalized string placeholders in communication with the engine
- a41d9df replace some references of Clonk Rage with references to OpenClonk
- fd4029a remove fair strength attribute (obsolete with openclonk)
Parent - - By Newton [th] Date 2014-04-19 15:50
Right. But the todos doesn't seem to be big:

7abea47: define link url per game (add DB column)
1c24854: add 6b164fba97facfdbc414286d3b1b49984991891d and 8da7c6b20f864e361772ef41a461c20a9c94e7d3 to Clonk Rage source
a41d9df: partly revert. Don't remove CR but add OC
fd4029a: probably simply revert.

However, my initial question was more intended not from the technical side but what would make sense.
Parent - - By Sven2 [de] Date 2014-04-19 19:43
Why did you move localization to the engine by the way? The league already has localization functionality. And as far as I know, that has always been working fine?
Parent - By Zapper [de] Date 2014-04-19 20:30
A random guess would be that it supports user-created translations that way?
Parent - - By Newton [th] Date 2014-04-19 20:45
I think the initial reason was some bug in the bugtracker that complained about an error message like this:

"Fehler beim Anmelden des Spiels: Failed to do this and that."

First part was a localized error string from the engine, second part was a failure response from the masterserver. Which was always sent in English. So, I can not acknowledge that it has been working fine.

I solved it with these two commits: The masterserver/league only talk in error codes now which are localized for display in the engine. I think it is also cleaner this way.
Parent - - By Sven2 [de] Date 2014-04-19 20:57

> "Fehler beim Anmelden des Spiels: Failed to do this and that."


So the league got the wrong localization information? But that is just a bug then. It could have been fixed.

> The masterserver/league only talk in error codes now which are localized for display in the engine. I think it is also cleaner this way.


What does "cleaner" mean in this context?

It is harder to maintain, because league updates introducing new errors will always need an engine update. It also makes the interface between league and engine more complex because all error messages are now part of the interface.
Parent - - By Newton [th] Date 2014-04-20 05:38 Edited 2014-04-20 05:43

> What does "cleaner" mean in this context?


In the way that I learned that this is how it is done(tm). E.g. a HTTP client doesn't tell the server which loca it has and the server sends something back like "Verboten!".

> So the league got the wrong localization information? But that is just a bug then. It could have been fixed.


How does it get that information?

> It is harder to maintain, because league updates introducing new errors will always need an engine update


Only league updates that change the communication with the engine. These will likely need an engine update anyway.
Parent - - By Sven2 [de] Date 2014-04-20 09:10

> In the way that I learned that this is how it is done(tm). E.g. a HTTP client doesn't tell the server which loca it has and the server sends something back like "Verboten!".


Ah, now I understand your logic. You think of HTTP status codes (like 404 not found) and league error identifiers are an extension of that. But
1. I don't think that's warranted, because we're one protocol above that.
2. Requested language is sent as part of the HTTP request and the server is instructed to reply an this language. It's called "Content-Language". From an HTTP point of view, league replies are content.
3. HTTP answer actually include the text in addition to the status code. E.g. a server may answer "HTTP/1.0 302 Moved Temporarily", not just "302".
4. We also have a "Status" field. It's the field the engine interprets to decide e.g. if a login was successful. That's a different field and it already uses fixed identifiers.

> How does it get that information?


From the Content-Language HTTP field

> Only league updates that change the communication with the engine. These will likely need an engine update anyway.


No, league reply codes contain high-level information such as "scenario is not a melee" or "too many game starts". Those change as league features are added. For example, if we add a competition mode where players play out an elimination bracket, we need new identifiers like "you're not part of this competition" or "you've already played your game for this round". It might even contains custom strings like "League is down for Easter maintenance.". Do you want to add every possible reason why the league may reject a game in the future to the engine?

The things the engine interprets are in the "Status" field.
Parent - - By Newton [th] Date 2014-04-20 13:52 Edited 2014-04-20 14:05
Okay. I won't object if you revert the commits.
Parent - By Sven2 [de] Date 2014-04-20 15:08
OK, thanks
Parent - By Sven2 [de] Date 2014-04-19 19:36
Multiple products are supported in principal. It just hasn't been tested a lot.

Though I agree with Maikel: I see no reason to move to Clonkspot at this point.
Parent - - By Maikel Date 2014-04-19 16:21
Would you care to explain why? Personally I don't see the need to outsource the league.
Parent - - By Newton [th] Date 2014-04-19 20:52
Because the OpenClonk website is most of all about the development of OpenClonk. Clonkspot, now with the slow demise of clonk.de is evolving into the new center for the clonk community which consists of ClonkRage and OpenClonk in my understanding. With the old clonk.de ClonkRage-registration based community sites either dying or adapting to something not ClonkRage centered (i.e. not requiring CR registration) and with Lorry as the new CCAN underway which also focusses on OC and CR alike, the idea suggests itself that we don't have to include everything OC related like the league, a download archive, etc. on this website but outsource the "community-stuff" to clonkspot and other external websites.

I only brought up this point because I remembered Sven2 being in favour of this. But it seems he changed his opinion?
Parent - - By Sven2 [de] Date 2014-04-20 09:16

>  But it seems he changed his opinion?


Yes. Well, we've already put a considerable amount of time into building the OC league now. Also, it seems to me that the Clonk Rage people would rather stay independent.

We could still temp host the CR league on OpenClonk if the clonkspot crew doesn't finish their league port in time (i.e. when the clonk.de league closes).
Parent - - By Newton [th] Date 2014-04-20 13:52
When does it close?
Parent - By Sven2 [de] Date 2014-04-20 15:07
I have no idea.
Up Topic General / General / Outsourcing the league to Clonkspot

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill