S6: Synchronized S5
S5 + AJAX = S6
Carsten Bormann
cabo@tzi.org
Presenter: Press “L” before starting
Student: Press “F” before starting
The classroom problem
- Presenter has one copy of slides
- Uses aging, dim projector to show them
- Students need to squint in the bright sun
- They all have laptops and love looking at the slides there
- So you hand out PDFs in advance
- Problem: How to move their slides in sync?
Enter S5
- S5 is the solution for web-based presentation
- Why not use S5 for the classroom presentation
- Small matter of programming:
- Write AJAX code to sync multiple copies
- Write server code to provide the synchronization
- → S6
- Synchronized Simple Standards-based Slide Show Software
How to use S6
- Model: One slideset user (presenter) leads, all others (students) follow
- There is no explicit protection against multiple leaders, though
- Select roles by typing “L” to lead, “F” to follow
- Whenever leader changes slides, the followers follow
- Students can veer off (e.g., review last slide), but will be synchronized on next slide change
- If students really want to browse independently, they can “G”et out of the way, too
How does it work (1)
- In addition to the web server for the slides, there is a synchronization server
- Using the Apache Rewrite and Proxy modules to map it on the same server — necessary for XMLHttpRequest security model
- Sync server has two requests:
http://server/lead?url=…&value=…
- Used by the leader to set the current slide number for the given URL to the given value
- Returns immediately (giving estimate of number of followers)
- Leader sends
lead request after each slide change
How does it work (2)
http://server/follow?url=…&value=…
- Used by the follower to wait for a new slide number for the given URL
- The given value identifies what the follower believes to be the current slide number
- Returns immediately if the actual current slide number is different
- Otherwise, waits and returns only when the current slide number becomes different
- Follower sends
follow request immediately after becoming a follower, and each time the previous request returns
-
Of course, whenever that request returns, the follower switches to the given new slide first
Implementation
- Sync Server
- Frontend: 3 lines of Apache configuration
- Backend: 75 line Ruby program (based on WEBrick)
- Client: Changes in slides.js
- Added selected parts of Prototype library (~180 lines), see prototype.conio.net
- New code: ~75 lines
- Just works in Safari
- One Firefox fix needed in Prototype library
- Not yet tested too much in IE (basically works)
To do (1)
- Show Stoppers
- Doesn’t synchronize subitems (
subgo()) yet — SMOP
- Should be fixed
- The lead/follow indication is ugly (CSS not adapted)
- Keys don’t always register (some more debugging required)
- Path for syncserver (on slide server host) hardwired right now
To do (2)
- Hard to fix due to the model used
- The count that allows the leader to gauge how many followers there are will be off occasionally
- Can refresh by typing “L” repeatedly
- New follower starts at old position of previous leader until new leader comes online
- Could mitigate by aging out syncserver state
- Can’t really solve