[contestms] Re: Handling multiple contests on the same server

  • From: Vytis Banaitis <vytis.banaitis@xxxxxxxxx>
  • To: contestms@xxxxxxxxxxxxx
  • Date: Thu, 11 Feb 2016 02:55:35 +0200

Hi,

I have modified ES/Worker/PS to support multiple contests [0]
<https://github.com/lmio/cms/tree/multi_contest> and have used it in our
olympiads for a few years now.
In our setup we launch one or more CWS per contest, and one each of other
core services. cmsResourceService -a can't be used for CWSes with different
contest_ids, so we use supervisord for launching the services.

My branch is currently based on CMS 1.2. Didn't have the time to update it
to current master and submit a PR..


Vytis Banaitis

[0]: https://github.com/lmio/cms/tree/multi_contest


On Thu, Feb 11, 2016 at 1:26 AM, William Di Luigi <williamdiluigi@xxxxxxxxx>
wrote:

Hi,

I was thinking about this recently. Thanks for bringing that github issue
up, since I didn't know it existed. It's good to know that ScoringService
already supports this, for some reason I still thought it didn't.

So, if I'm not mistaken, that leaves just EvaluationService (+ workers),
ProxyService, and CWS to be changed in order for CMS to support
multi-contest setups.

I'm not too familiar with ES/PS/Worker source code, but for CWS I think
that the change should not be too hard to do. I recently chatted with
Stefano about this and I suggested to put a "contest selection page" just
after the login page (listing only the contests where the current user
*participates*, since now CMS supports participations). When the user
clicks on a contest (let's say with id = 7 and name = "mycontest") he/she
will be redirected to the /mycontest URL and everything will be just as if
CWS was started with --contest-id=7.

So, CWS shouldn't be too difficult to fix, I think I will soon start
working on it. As for ES and the rest, I'd say let's wait for some official
response :P

Regards,
William


On Wed, Feb 10, 2016 at 9:11 PM Agustín Santiago Gutiérrez <
elsantodel90@xxxxxxxxx> wrote:

Hi, I've come across this issue

https://github.com/cms-dev/cms/issues/73

Which seems to have been open for a long time. The last comments states
that it has been already done for SS. What is the status of others services
regarding this? Particularly in the current stable release 1.2

This is particularly useful for setups where there are many divisions
during the same contest. So far I have always created parallel and
independent versions of every single cms service running on different ports
with different configuration files, one per division. But it would be nice
if it was possible to use a single instance of a service for all of the
contests, since that would make only one configuration file necessary
(well, there should probably be one ContestWebserver per division, but as
far as I can tell this is the only cms-service where such a thing would be
necessary. I don't remember if one can successfully specify two services of
the same kind running on the same host on different ports in the same
configuration file, although there is no essential reason why that could
not be done, other than somehow having to specify the port number when
bringing a server up, apart from the configuration file).

Thanks

Agustín


Other related posts: