Dr. John Clevenger• Professor of Computer Science, Emeritus
California State University, Sacramento
• Technical DirectorACM International Collegiate Programming Contest
Applied Research Areas Operating Systems
Computer Graphics
Computer Game Architecture
Programming Contests
Dr. John Clevenger -- CSc 209
What’s a Programming Contest ? Teams
Judges
Problems
Scoreboards and Scoring Algorithms
System Support Software
Dr. John Clevenger -- CSc 209
The International Collegiate Programming Contest (“ICPC”)
Competition between University Teams around the world
Established by ACM in 1977
Sponsored by IBM since 1997
Multi‐tiered contest
Local university contests
Regional Contests
World Finals Contest
Dr. John Clevenger -- CSc 209
ICPC 2015‐16
Dr. John Clevenger -- CSc 209
38,160 student contestants
2,534 universities
101 countries
459 sites spread over six “super‐regions”
40th Annual World Finals: May 15‐20, 2016 in Phuket, Thailand
http://icpc.baylor.edu
ICPC World Finals
Dr. John Clevenger -- CSc 209
Programming Contest Software Contest Control System (CCS)
Scoreboard/Presentation Systems
Contest Data Server (CDS)
Balloon Management Software
Analytic Tools
Live TV Presentations
Security Tools
Dr. John Clevenger -- CSc 209
Contest Control Systems
Dr. John Clevenger -- CSc 209
Server
Team1
Team2
TeamN
…
Admin
Automated Judge (AJ)
…
Scoreboard
Server …
Human Judge
Automated Judge (AJ)
Human Judge…
Dr. John Clevenger -- CSc 209
The CSUS “PC2” CCS Used in contests around the world (including at 17 different ICPC
World Finals)
PC2 Downloadsas of Spring 2014
Research Projects: PC2 Extensions
Interface to ICPC Web Services “Remote Test Run”
“Next‐Gen” Contest Control Systems About Cloud Computing “Contest as a Service”
PC2 Version 10
Dr. John Clevenger -- CSc 209
PC2 ↔ ICPC Web Services The ICPC Contest Management System (CMS)
https://icpc.baylor.edu/community/cmsinterface
Dr. John Clevenger -- CSc 209
CMS
Contest 1
Contest N
…
Contest AdminDefine Contest*
Register for Contest*Teams
Upload Results*
Web
Ser
vices
REST endpoints for:• Obtaining contest info
(teams, contests, social media,…)• Uploading results
*Manual interactive processes
Web Client
PC2 v9 PC2 v10
ICPC Interface
PC2 “Test Runs”
Dr. John Clevenger -- CSc 209
Admin
Teams
PC2 Server
Run
Compare
PC2 v9 TeamProblem: Language: Source File:Add’l Files:
Test Submit
acceptSubmission():
Compile
Execute
Validate
return Judgment
Executable File
Output File
Judge’s Answer
File
EW Web TeamProblem: Language: Source File:Add’l Files:
Submit
PC2 v10 TeamProblem: Language: Source File:Add’l Files:
Submit
CompileExecute
Show Output
acceptSubmission():
Compile
Execute
if (judgedRun){Validatereturn
Judgment} else {
return Output
}
JudgmentTest
Test
Cloud Computing
Dr. John Clevenger -- CSc 209
What IS “cloud computing”?
The Cloud Computing Secret:
Dr. John Clevenger -- CSc 209
Cloud Computing Models
Dr. John Clevenger -- CSc 209
Infrastructure as a Service (IaaS)(Virtual machines, servers, storage, …)
Platform as a Service (PaaS)(Programming tools, databases, web servers, …)
Software as a Service (SaaS)Email, messaging, payroll processing, CAD, accounting,
customer relations, games and VR, …
Web clients
(browsers,
mobile apps,
thin clients,
terminal emulators,
…)
Contest as a Service (CaaS)
Dr. John Clevenger -- CSc 209
Software as a Service (SaaS)
Contest Server
Contest Admin
Contest AutoJudge
Contest Human Judge
Contest Team
Contest Scoreboard
ContestAdmins, Judges, Teams,
Spectators,…
CaaS Requirements Contest setup
Component “spin‐up” servers, admins, teams, judges “as needed”
Scalability Load balancing/monitoring
Use existing support facilities Application servers (TomCat, Jetty, Websphere) Docker, Cloud Foundry Cloud Service Providers
o Amazon WS, Google AppEngine, Microsoft Azure, IBM Bluemix, ….
Dr. John Clevenger -- CSc 209
CaaS: PC2 Version 10
Dr. John Clevenger -- CSc 209
AppServer
Jetty WebServer
Jersey REST
Services
MySQLDatabase
…
Spawn Machines
Resource Manager
Jetty
Dispatcher
Jetty
Checker
JettyRun
Compare
Compile
…
Spawn additional machines as needed
Http Requests
Projects Next‐Phase
Remote machine spawning Load Balancing
Front‐end Back‐end
Virtualized Auto‐Judging Analysis
Down‐the‐road Database Optimization Status Tracking Cheating Detection
Dr. John Clevenger -- CSc 209
Remote Machine Spawing Spawned machines are currently Local JVM’s… Need to generalize the spawning operation
Remote machines VMWare virtual machines Docker Containers
Dr. John Clevenger -- CSc 209
AppServeron Remote host
Spawn Machines
Resource Manager
Dispatcherin Docker Container
Checker on VMWare VM
…
… …
AppServeron VMWare VM
Dispatcheron Remote Host
Front‐end Load Balancing Users need a single set of URLs (REST endpoints) Multiple AppServers must respond to the same URLs… Need a front‐end balancer/router
“Pound” (http://www.apsis.ch/pound)
Dr. John Clevenger -- CSc 209
AppServer1
Spawn Machines
Resource Manager
…
AppServer2
AppServer3
Load Balancer
Http Requests to fixed Contest
URLs
Admins, Judges, Teams, Spectators
?
Back‐end Load Balancing Resource Manager automatically starts (one) AppServer,
Dispatcher, & Checker How does it determine when more are needed?
RM must implement “system monitoring”
Dr. John Clevenger -- CSc 209
AppServer1Spawn at Startup Resource
Manager
Dispatcher1 Checker1
…
AppServer2 Dispatcher2 Checker2
Load Monitor
… …
Check load
Spawn new modules
Virtualized AutoJudging Current approach: VM servers,
physical judges
Can Judging be done on VMs ? Fairly? Efficiently?
Difficulties: Differences between physical and virtual judges Differences between distinct virtual judges
Dr. John Clevenger -- CSc 209
Server
TeamN
Team1
AJ … AJ
…
Future Plans Database Optimization for Scalability
Configure various Master/Slave DBMS configurations Use tools such as Locust to find optimal configuration under loading
Status Tracking Provide SysAdmins with tools to show module status/state, history,
traffic, etc.
Cheating Detection Create a facility modeled on “intrusion detection” systems
Examine network logs, network access patterns Compare team submissions (including changes over time) for
“software similarity”
Dr. John Clevenger -- CSc 209
Background/Experience Java (preferably JavaEE)
Web services Application Servers (Tomcat, Jetty, …) REST principles Web protocols and standards
HTTP/S, HTML, JSON, XML, …
Good English writing skills
A Penchant for Programming!
Dr. John Clevenger -- CSc 209
Contact Info / Resumes:Dr. John Clevenger
email: [email protected]
office: RVR 5018
Hours: by appointment
Thank You!
Dr. John Clevenger -- CSc 209