-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathContest_Data_Server_2017.mw
175 lines (111 loc) · 7.77 KB
/
Contest_Data_Server_2017.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
== Introduction ==
This page documents the version 1.2 release of the CDS, as it was used at the 2017 World Finals.
The Contest Data Server (or CDS) is a one-stop shop for external clients to obtain all onsite contest related information. This document contains information on the services (URLs) that are available from the CDS, what content is returned, and links to specs for the format of some files.
It's best to think of the CDS as an aggregator and gate keeper. It provides a single source for information and controls access, but most of the data is provided by sources on the blue network, including the Contest Control System and data extracted from the Baylor CMS.
=== Implementation Notes ===
* URLs below are in the format "http://cds/xyz". The exact hostname or IP address for 'cds' will be provided once the network is setup onsite; contest machines configured by sysops will be able to lookup this hostname.
* Some of the URLs contain a year (e.g. http://cds/2015/xyz") to indicate that these are temporary formats that will almost definitely change over the following year.
* Invalid URLs, parameters (e.g. teamNum=500), or missing images will return the standard HTTP status codes 404. Ditto for authentication and code 403.
== Access & Authentication ==
Requests for access to the CDS must be made through the world finals technical director (John Clevenger) and must include contact information for during the finals. Many of the services will contain private information, so each client will be given a unique user id & password to connect to the CDS. Access to all secure services is via HTTPS. (HTTP access will be redirected)
To simplify security, access is provided via roles that each have access to different content. The defined roles are as follows:
* Public - Access only to data/services that are public contest info and can be shared externally at any time. These few services require no authentication.
* Authorized - Authorized access to public data/services that can be shared externally at any time.
* Analyst - Authorized + access to team backups and submission source.
* Balloon - Authorized + access to runs within the last hour if the team has less than 3 balloons.
* Blue - Full access to all data/services, typically someone within the contest network. (e.g. results during final hour)
* Admin - Full access + control authority.
Access builds somewhat logically, e.g. Blue users have access to everything that Analysts & Balloon have. The services below are marked with what access role is required.
[[Contest Security]]
[[Contest Data]]
== Services ==
The following section describes all of the services that are available through the CDS.
=== Images ===
==== Team University Logos ====
<nowiki>https://cds/images/logo/[teamNum]</nowiki>
''Access: Authorized''
Returns a png image 600x600 or smaller of the given team's University logo.
==== Team Photos ====
<nowiki>https://cds/images/team/[teamNum]</nowiki>
''Access: Authorized''
Returns a full HD (1920x1080) jpeg photo of the given team, typically taken during registration.
==== Team Overlay Images ====
<nowiki>https://cds/images/overlay/[teamNum]</nowiki>
''Access: Authorized''
Returns a full HD (1920x1080) png containing the team logo and name, for use as an overlay graphic.
The logo is in a rectangle that is 230x230 pixels, with the upper left corner of the rectangle located at 95 pixels from the left side and 795 pixels down from the top of the PNG image. The team name is in the ICPC font (Helvetica) in a rectangle that is 1275x230 pixels (width x height), with the upper left corner of the rectangle at 370 pixels from the left side and 795 pixels down from the top of the PNG image. Either graphic may or may not fill its entire rectangle.
A sample overlay file is provided here: [[Media:28.png]].
=== Data Feeds ===
==== Contest Control System Event Feed ====
<nowiki>https://cds/events</nowiki>
''Access: Authorized''
Returns the 2016 event feed as generated by the CCS: [[Event Feed 2016]].
Clients without Blue access rights will receive a filtered event feed not containing submission judgments from the final hour.
==== Contest Feed Proposal ====
<nowiki>https://cds/contest</nowiki>
''Access: Authorized''
Returns a stream similar to the event feed, but merged with contest data from multiple sources: yamls, tsv, etc. Also supports filters/queries & JSON. Use at your own risk - this feed is being used to test future options.
==== JSON Scoreboard ====
<nowiki>https://cds/scoreboard</nowiki>
''Access: Authorized''
Returns a JSON scoreboard as defined here: [[JSON Scoreboard 2016]]
Clients without sufficient access rights will received a filtered scoreboard that does not contain submission judgments from the final hour.
==== Optimistic JSON Scoreboard ====
<nowiki>https://cds/optimisticScoreboard</nowiki>
''Access: Authorized''
Returns a JSON scoreboard as defined here: [[JSON Scoreboard 2016]]
The optimistic scoreboard assumes that the last submission made on any problem during the freeze is solved. e.g. if a team has submitted three times after the scoreboard freeze, this scoreboard will assume that the first two were wrong answers and the third was correct.
This scoreboard may not be shown publicly unless it is clearly labelled as a possible projection! In reality the first submission might have been correct, or the third may still not be solved.
==== Contest RSS Feed (Draft) ====
<nowiki>https://cds/rss</nowiki>
''Access: Authorized''
Returns an RSS feed of solved submissions, e.g. "University of X solved problem Y!"
Clients without sufficient access rights will received a filtered RSS feed that does not contain submission judgments from the final hour.
=== Video ===
==== Team Videos ====
<nowiki>https://cds/video/team/[teamNum]</nowiki>
''Access: Authorized''
Returns a full HD (1920x1080) video of the given team, typically taken during registration.
* Video container: MPEG-TS
* Video codec: H.264
==== Team Webcam Stream ====
<nowiki>http://cds/video/camera/[teamNum]</nowiki>
''Access: Public''
Returns a video stream from the camera at the given team's workstation.
* Video container: MPEG-TS
* Video codec: H.264
==== Team Desktop Stream ====
<nowiki>http://cds/video/screen/[teamNum]</nowiki>
''Access: Public''
Returns a video stream of the given team's desktop.
* Video container: MPEG-TS
* Video codec: H.264
==== Channels ====
Channels are a paired camera & screen video that can be changed on demand. It allows a client to use a fixed url for the duration of the contest, and for another user (typically an analyst) to switch which team the client is watching.
<nowiki>http://cds/video/camera/channel/[channelNum]</nowiki>
<nowiki>http://cds/video/screen/channel/[channelNum]</nowiki>
''Access: Public''
Returns video streams of the given channel, with content and format identical to the team webcam and desktop streams above.
<nowiki>https://cds/video/channel/[channelNum]/[teamNum]</nowiki>
''Access: Analyst''
Changes the given channel to output from the given team.
==== Reaction Videos ====
<nowiki>https://cds/video/reaction/[submissionId]</nowiki>
''Access: Authorized''
Returns a camera recording of the team for the given submission. Each video is X seconds long.
Returns a 404 if the submission id is invalid or the video was not finished recording.
* Video container: MPEG-TS
* Video codec: H.264
=== Other ===
==== Submission Source ====
<nowiki>https://cds/submissionFiles/[submissionId]</nowiki>
''Access: Analyst''
Returns the source files for a team submission given a submission id.
==== Team backup files ====
<nowiki>https://cds/backups/[teamId]</nowiki>
''Access: Analyst''
Returns an archive (.tar.gz) with backup files from a Team's machine.
==== Start Time ====
<nowiki>https://cds/countdown</nowiki>
''Access: Blue''
Allows the contest director to control the contest start time.