Not logged inOpenClonk Forum
Up Topic General / Feedback and Ideas / League / Masterserver problem
- - Date 2014-12-28 09:38
Parent - - By Newton [de] Date 2014-12-16 00:38

> * League server didn't work because of the version update. We had to do direct IP join (see bugtracker #1190)


OK I produced this, so I will fix this. Did the openclonk-league source code move? Is the "most current" source code now hosted on clonkspot?
Parent - By Sven2 [de] Date 2014-12-16 01:14
I don't know about the state of the clonkspot repository. The last thing I uploaded to openclonk.org was the state of our repository.
Parent - By B_E Date 2014-12-16 13:45
AFAIK Luchs has made various fixes and improvements to the league source code. He published them on GitHub.
Parent - - By Luchs [de] Date 2014-12-17 12:08
I pushed some of my improvements to the master branch of the openclonk repository as well. Most of my changes require Redis though, so I didn't port them.

Is running Redis on the OC league server possible? We'd like to show OC games on our live servers page (screenshot) as well, which uses Redis pubsub and caching to provide the game updates live. Porting the changes shouldn't be an issue, I can do that.
Parent - By Anonymous [de] Date 2014-12-18 11:30
No, we don't have redis on the webspace.
Reply
Parent - - By Newton [de] Date 2014-12-21 12:13
Since the private repository was a provisional solution anyway, I'd like to the the OC league server as a branch on that github repository as well. Is this OK for you and if yes, could you create that branch and add Sven2 and me to the group of people with push access?
Parent - - By Sven2 [de] Date 2014-12-21 12:16
Couldn't Isilkor just give public read access to the repository on openclonk.org?
Parent - By Newton [de] Date 2014-12-21 13:54
I just think it would be better to have the code in one place. And Luchs already set up the repository on github.
Parent - - By Luchs [de] Date 2014-12-21 13:05
I added you to the repository. I'm not sure about having two branches, maybe we should try to get a single codebase for both leagues? I think most differences are currently just a few strings and the icons anyways. We could move these out in different repositories or have a configuration option switching between the two sets.
Parent - - By Newton [de] Date 2014-12-21 13:54
I think maintaining a single codebase is more work than it is worth. Also, redis doesn't work on openclonk.org.
Parent - - By Luchs [de] Date 2014-12-21 14:12
The Redis stuff is optional, the current Clonkspot league also runs fine without it. But maybe we can run Redis on a different server and connect over the internet? I don't know whether the performance would still be acceptable with this setup, though.
Parent - - By B_E [de] Date 2014-12-25 17:38
To be honest, if you deliver the live game events via a different server you could just as well do plain old polling. The running games are mainly interesting once you open the page and whenever you check the tab again later (or for notifications), so +/- 30 seconds doesn't really make a difference. As nice as an event-driven application is, even the Clonk client just polls the server every few seconds.
Parent - - By Luchs [de] Date 2014-12-25 18:00

>To be honest, if you deliver the live game events via a different server you could just as well do plain old polling.


Because of the performance? It's going to be worse with polling in any case.

>+/- 30 seconds doesn't really make a difference


Especially if you know that a game will be there any second, knowing that the game list always is live is nice.

>the Clonk client just polls the server every few seconds


...because there wasn't a good way of delivering the list live in the past. Maybe the Clonk client should be updated?
Parent - By Zapper [de] Date 2014-12-25 18:43

>...because there wasn't a good way of delivering the list live in the past. Maybe the Clonk client should be updated?


It would be amazing if you implemented that <3
Parent - - By B_E [de] Date 2014-12-25 19:23 Edited 2014-12-25 19:25

>Because of the performance? It's going to be worse with polling in any case.


No, but as far as I have seen the masterserver in action in the past it's fine with dozens of players polling with their Clonk clients + a few Web viewers. If every request counted then yeah, of course we should care. You are just replacing the near non-existant request overhead with the overhead of keeping a connection open and keeping a database which is also minimal - but webservers are big :-).

>Especially if you know that a game will be there any second, knowing that the game list always is live is nice.


I just can't agree that it's so important. If I play Clonk, I'm in the game, and looking for what's open. I won't decide in a split-second to suddenly play Clonk. I can see that this might be a cool thing to have, it's just not really useful IMO.

On the other hand, having a new feature is obviously really cool, but maybe it should be implemented in a more general and open way? For example the server could accept subscribtion urls which he then pings with updates, rather than having a private server hosting a private Redis database which then informs web clients.
Parent - - By Luchs [de] Date 2014-12-25 23:24
I'm not sure what you're trying to achieve here - the "masterserver updates live" functionality is already live on clonkspot.org and could be adapted for OC with minimal work (but great effect!). The old interface wouldn't go away, but would be augmented with something better.

>For example the server could accept subscribtion urls which he then pings with updates, rather than having a private server hosting a private Redis database which then informs web clients.


This wouldn't work for most use cases though, as we cannot ping most people through their firewalls. The event stream endpoint already uses an open format (text/event-stream in combination with JSON) which can easily be used by third-party servers.

The data schema obviously isn't standardized, but this has always been the case with the masterserver communication. The JSON format used isn't nice as it's a direct  json_encode on the data structure in the league, but it's still easier to consume this way.
Parent - By B_E [de] Date 2014-12-28 09:38
I agree. Maybe we could work towards a decently documented API exposing all of reference data? Alternatively one could use an event as a trigger to request the actual references from the masterserver. If we improve the masterserver API, for example to request a specific reference, it would also scale much better than the current list.
Parent - By Luchs [de] Date 2015-06-12 14:49
There's now an openclonk branch in the repository. I also fixed a bug and added some code which would allow integrating OC games in the clonkspot game list (without Redis).
Up Topic General / Feedback and Ideas / League / Masterserver problem

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill