Event Feed Module - pc2ccs/pc2v9 Wiki


The Event Feed module is a stand-alone client module which provides PC2 Event Feed and related web services. It is started as a separate PC2 client, analogous to the way the PC2 server, judge, and scoreboard clients are started. Once running, it allows enabling various services including the PC2 Contest API, the PC2 JSON Event Feed, the Legacy XML Event Feed, and PC2 Shadow Mode operations.

It is arguable that "Event Feed" is a poor name for this module since it supports numerous services beyond those associated with Event Feeds; the name is historical -- the first version of the module supported (only) Event Feed services; other services were added later but the module was never renamed. :(


  • Use the PC2 Admin to create a FEEDER pc2 account.
  • Use the command script ./bin/pc2ef to start the Event Feed module.
  • Login using the Feeder account.

This will bring up the Event Feed Module GUI. None of the Event Feed Module services will be started by default; use the Start buttons on the various GUI tabs to start specific services.

GUI Options

Web Services Tab

The following controls on the Web Services GUI have the following meanings:

  • Web server port field - port number on which the PC2 Web Server listens; defaults to 50443
  • Enable Web Services
    • CLICS Contest API: enables the CLICS Contest API.
    • /Starttime: enable the legacy PC2 "Start Time API".
    • /submission_files: enable the legacy PC2 "submission_files" API.
  • View Event Feed: displays the current (complete) JSON Event Feed in a separate window.
  • Start - start serving Contest API REST endpoints.
  • Stop - stop serving Contest API REST endpoints.

Legacy (XML) Event Feed Tab

  • Event feed port field - allows setting the port number used by the legacy XML Event Feed; defaults to 4713.
  • View button - show a snapshot of the legacy XML event feed.
  • Start - start the Legacy XML Event Feed server.
  • Stop - stop the Legacy XML Event Feed server.

Shadow Mode

This tab allows starting, stopping, and managing PC2 Shadow Mode operations.

Non-GUI options

The argument --nogui can be added to the pc2ef startup command; this will start the Event Feed Module in non-GUI mode. When started in non-GUI mode the Event Feed service will be started by default; however, no other services will be started. Web services can be enabled and disable using settings found in the file pc2ws.properties, which is read by the Event Feed Module on startup.

Note that as of this writing the pc2ws.properties file has not been updated to support management of the CLICS Contest API REST services.

Sample pc2ws.properties file

 # File:    pc2ws.properties
 # Purpose: Sample PC^2 Web Server properties
 # Revised: Wed May 10 11:17:45 PDT 2017
 # enable scoreboard web service
 # port for web service
 # enable teams web service
 # enable starttime web service
 # enable language web service
 # enable problems web service
 # enable submission_files web service

Each web server service defaults to NOT enabled for security reasons


When the Event Feed Module is run it sends log messages to the PC2 Log file. Here is a sample of the output written to the PC2 log:

220615 084202.429|INFO|AWT-EventQueue-0|showMessage|Starting /starttime web service
220615 084202.433|INFO|AWT-EventQueue-0|showMessage|Starting /fetchRun web service
220615 084202.598|INFO|AWT-EventQueue-0|showMessage|Starting /contest web service
220615 084202.601|INFO|AWT-EventQueue-0|showMessage|Starting /contest/scoreboard web service
220615 084202.604|INFO|AWT-EventQueue-0|showMessage|Starting /contest/languages web service
220615 084202.607|INFO|AWT-EventQueue-0|showMessage|Starting /contest/teams web service
220615 084202.609|INFO|AWT-EventQueue-0|showMessage|Starting /contest/groups web service
220615 084202.612|INFO|AWT-EventQueue-0|showMessage|Starting /contest/organizations web service
220615 084202.614|INFO|AWT-EventQueue-0|showMessage|Starting /contest/judgement-types web service
220615 084202.617|INFO|AWT-EventQueue-0|showMessage|Starting /contest/clarifications web service
220615 084202.623|INFO|AWT-EventQueue-0|showMessage|Starting /contest/submissions web service
220615 084202.625|INFO|AWT-EventQueue-0|showMessage|Starting /contest/problems web service
220615 084202.628|INFO|AWT-EventQueue-0|showMessage|Starting /contest/judgements web service
220615 084202.631|INFO|AWT-EventQueue-0|showMessage|Starting /contest/runs web service
220615 084202.634|INFO|AWT-EventQueue-0|showMessage|Starting /contest/event-feed web service
220615 084202.637|INFO|AWT-EventQueue-0|showMessage|Starting /contest/state web service

See Also