-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEvent_Feed_2016.mw
218 lines (176 loc) · 9.11 KB
/
Event_Feed_2016.mw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
This page describes the format of the CLICS ''XML Event Feed''.
The Event Feed consists of a series of XML elements which provide information on changes in the state of a contest.
The Event Feed described on this page was used at the ICPC World Finals in 2016 (hence the page title, above).
It has subsequently been deprecated in favor of a JSON-based event feed which is part of a newer CLICS [[Contest_API|''Contest API'']].
As a result, this page constitutes the specification for the final version of the CLICS XML Event Feed.
== Getting the feed ==
The Event Feed can come from any of a variety of different server sources; for example, a Contest Control System or a Contest Data Server. Regardless of the source, servers implementing the CLICS XML Event Feed do so by listening on port 4713 and sending the feed out to any client connecting to that port. Thus, to obtain the feed, connect to port 4713 on a server (host) which provides the feed and the entire feed for the contest will be sent to you. When the contest is finalized, the contest tag will be closed and then the connection will be closed.
Typically, connecting to port 4713 requires "authentication credentials" proving that the client is authorized to obtain the complete contest event feed.
An alternative is to connect to port 4714; this port provides what is known as a "frozen feed" -- that is, the event feed for the contest, with the exception that no judgement information will be sent for submissions which occurred during the last portion of the contest when the contest scoreboard is "frozen". When the contest is finalized, the contest tag will be closed and the connection closed (but you will still not get judgements for submissions which occurred during the scoreboard freeze period).
== Event Feed format ==
The event feed is structured as an XML document within the root element <contest>.
All events are separate elements at the top level. Elements are considered either ''static'', in which case only one such element occurs, or ''instances'', in which case different instances are distinguished by a unique id. When an element appears again in the feed, either static or an instance with the same id, it is considered to replace the previous occurrence.
Event feed sources may send extra tags beyond what is documented here; these may be ignored by clients reading the event feed but should not cause client errors.
Event types are:
;info: contest information and updates (static)
;language: information regarding the programming languages which teams are allowed to use for submissions
;region: information on the "groups" defined in the contest (in the ICPC World Finals, "groups" are referred to as "Super Regions", and events of this type are therefore referred to as "region" events). Instances of these events are identified with id 'external-id'
;judgement: information regarding a judgement which has been applied to a team submission (instanced with id 'acronym')
;problem: information about problems defined in the contest
;team: information about teams defined in the contest
;clar: information about clarification requests submitted by teams during the contest, along with updates (such as answers from the judges)
;run: information and updates about "runs" submitted by teams during the contest; known in other event feed formats as "submissions"
;testcase: information about the results (including the judgement) applied to the execution of a submission (run) against an individual test case (instance identified by 'i', the test case number) and contains the resulting 'judgement acronym'; "testcase" is known in other event feed formats as a "run" -- not to be confused with "run" in this XML event feed, which refers to a ''submission'' by a team
;finalized: contest finalization information (static)
If nothing is specified, elements are instances identified by an 'id'.
''Time'' and ''timestamp'' elements are specified in seconds; time elements are in contest time (relative to contest start, corrected for removed time intervals) while timestamps are in Unix epoch. Both are specified with three decimal places, i.e. with millisecond resolution. Times are truncated, so in a 5 hour contest a submission at 18000 seconds is late.
Events have time and timestamp sub-elements that represent the same real moment in time.
Sample events with inner element descriptions:
=== <info> ===
<info>
<contest-id>398578</contest-id>
<length>05:00:00</length>
<scoreboard-freeze-length>01:00:00</scoreboard-freeze-length>
<penalty>20</penalty>
<started>False</started>
<starttime>1265335138.260</starttime>
<title>The 2016 World Finals of the ACM International Collegiate Programming Contest</title>
<short-title>2016 World Finals</short-title>
</info>
;contest-id: Contest identifier, which is of the form <code>[a-z0-9-]{1,36}</code>, i.e. lowercase letters, digits, and dashes with length at most 36 (this allows a UUID).
;length: Length of contest in HH:MM:SS format.
;scoreboard-freeze-length: Length of time at the end of the contest when scoreboard is frozen in HH:MM:SS format.
;penalty: Penalty time in minutes.
;started: Started flag.
;starttime: Scheduled starttime as a timestamp in decimal seconds, or <starttime>undefined</starttime> if the scheduled start time is not defined.
;title: Contest title string.
;short-title: Shortened contest title (from contest.yaml)
=== <language> ===
<language>
<id>1</id>
<name>C++</name>
</language>
;id: Language identifier.
;name: Language name.
=== <region> ===
<region>
<external-id>3012</external-id>
<name>Europe</name>
</region>
;external-id: Identifier from the registration system.
;name: Super region name.
=== <judgement> ===
<judgement>
<acronym>CE</acronym>
<name>Compile Error</name>
</judgement>
;acronym: Short name
;name: descriptive name
=== <problem> ===
<problem>
<id>1</id>
<label>A</label>
<name>APL Lives!</name>
<color>red</color>
<rgb>#FF0000</rgb>
</problem>
;id: Problem identifier
;label: problem label on the scoreboard
;name: descriptive name
;color: problem color name (optional, from [[Contest_Control_System#problemset.yaml|problemset.yaml]])
;rgb: problem color [http://en.wikipedia.org/wiki/Web_colors#Hex_triplet RGB hex value] (optional, from [[Contest_Control_System#problemset.yaml|problemset.yaml]])
=== <team> ===
<team>
<id>1</id>
<name>American University of Beirut</name>
<nationality>LBN</nationality>
<university>American University of Beirut</university>
<university-short-name>U Beirut</short-name>
<region>Europe</region>
<external-id>23412</external-id>
</team>
;id: Team identifier and at World Finals the team seat number.
;name: Team name
;nationality: nationality as [https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3 ISO 3166-1 alpha-3]
;university: university affiliation.
;university-short-name: shortened university name (from [[Contest_Control_System#teams.tsv|teams.csv]])
;region: super region name.
;external-id: team id from registration system.
Additional information may be provided.
Note that for the World Finals the team name is set to the university name, but this need not be the case at ICPC regionals or other contests.
=== <clar> ===
<clar>
<answer>The number of pieces will fit in a signed 32-bit integer.</answer>
<answered>True</answered>
<id>1</id>
<question>What is the upper limit on the number of pieces of chocolate requested by the friends?</question>
<team>0</team>
<problem>1</problem>
<nowiki><time>118.480</time></nowiki>
<timestamp>1265335256.480</timestamp>
<to-all>True</to-all>
</clar>
;answer:
;answered: Answered flag
;id: Clarification identifier
;question:
;team: Team ID
;problem: Problem ID
;time:
;timestamp:
;to-all: to-all flag
=== <run> ===
<run>
<id>1410</id>
<judged>True</judged>
<language>C++</language>
<penalty>True</penalty>
<problem>4</problem>
<result>WA</result>
<solved>False</solved>
<team>74</team>
<nowiki><time>17960.749</time></nowiki>
<timestamp>1265353100.749</timestamp>
</run>
;id: Run identifier
;judged: Judged flag
;language: language name
;penalty: penalty flag
;problem: problem ID
;result: result short name
;solved: solved flag
;team: team ID
;time: official submission time used for scoring.
;timestamp:
=== <testcase> ===
<testcase>
<i>1</i>
<judged>True</judged>
<judgement>WA</judgement>
<n>1</n>
<run-id>1</run-id>
<solved>False</solved>
<nowiki><time>939.752</time></nowiki>
<timestamp>1265336078.752</timestamp>
</testcase>
;i: testcase number
;judged:
;judgement: Judgement acronym
;n: Total number of testcases
;run-id:
;solved:
;time:
;timestamp:
=== <finalized> ===
<finalized>
<timestamp>1265336078.015</timestamp>
<last-gold>4</last-gold>
<last-silver>8</last-silver>
<last-bronze>12</last-bronze>
<comment>Finalized by John Doe and Jane Doe</comment>
</finalized>
;timestamp:
;last-gold:integer, last rank to receive a gold (should always be 4 for a [[Contest_Control_System#Scoring_Data_Generation|compliant system]])
;last-silver:integer, last rank to receive a silver (should always be 8 for a [[Contest_Control_System#Scoring_Data_Generation|compliant system]])
;last-bronze:integer, last rank to receive a bronze (should often be 12 but could very possibly be something else)
;comment:text