Warning: file_put_contents(): Only 0 of 8322 bytes written, possibly out of free disk space in system/classes/filecache.php line 154
Warning: file_put_contents(): Only 0 of 303 bytes written, possibly out of free disk space in system/classes/filecache.php line 157
Presenter - RedAlt

Recently at work we started a weekly lunch time online and via conference call gathering that we call a "brain session", where the person who is selected for the week brings up a topic of interest to himself, shares it with the group, and produces some discussion. One of the technical difficulties of this project is producing some kind of shared visual prop that everyone can look at while the person is talking. In some cases this is a demonstration of code, in other cases it's just a PowerPoint slide, and sometimes it's as complicated as a real screen cast of the desktop.

My turn is up next week and I would really like to have a solution to this that doesn't involve some complicated process and crazy screen sharing software. PowerPoint is great but for the particular topic that I want to present I want to make sure that nobody skips ahead, so I want some control over explicitly what slide everyone is looking at. It would also be nice if there was some interaction with the people who were viewing.

For example, the presentation that I'm thinking of giving has some simple test-like opportunities. Each viewer of the presentation would hear me speak a question aloud over our telephone conference bridge, and several options would appear onscreen. Everyone watching the presentation would be able to click on one of the options on screen, and a tally of the chosen selections would be sent to my console. Even better, the next slide could display the tally of votes so that everyone could see the results.

PowerPoint has this functionality when presenting in special conference rooms with specialized equipment. There are places where there are keypads attached to the chairs and participants can enter their responses into the keypads, which are forwarded to the presenter at the podium. This works great, except we don't have any of that hardware, and everyone will be looking at this presentation from the desktop at their own home. So what I need is a software solution, and that's why this post is relevant.

I've started writing some software that I call "presenter". This presentation software lets me publish a series of slides to the web, produce a list of participants who can log in and see it, and most importantly, control the display of slides remotely without having to install any special software or use any kind of streaming server.

Some of the other solutions might just say to use Flash, but to do that you need to use some kind of server component that multicasts whatever I'm broadcasting from my PC, and I don't really want to do that. My solution simply uses a combination of HTML and jQuery to make Ajax calls to the server looking for updates. I think the solution that I've developed is somewhat unique, at least I've not heard many people talk about this kind of solution. That's not to say that the solution is the best solution, because I see at least one big problem with that which will become evident as I describe it.

Basically what happens is the Ajax call hits a PHP script on the server. The PHP script checks for a value stored in the APC cache. Since the APC cache is shared between all scripts, the value of the cache can change even while the script is running. If the value in the cache is the same then the script merely sleeps for one second and then checks again. It will do that a preconfigured number of times for every request, currently defaulting to 30 checks per request. If the value changes or the maximum checks are reached in the script sends back a JSON response that explains to the viewing component (written in HTML and jQuery ) what it should currently display. The viewing component is smart about it and will not refresh a slide if changes weren't detected.

Using a memory-based cache lets me as the operator control what slide all the participants should see. Requesting a different URL, I get a thumbnail list of all slides that are present. When I click the slide, it sends a request to the server that sets the value in the APC cache. Immediately, all of the PHP processes running on the server or in sleep mode have access to that new value. When they come out of their one second sleep, they notice this change and immediately exit the sleeping loop and send back the JS and slide information.

Obviously the problem with this approach is that every viewer produces a PHP process on the server. I'm not sure there is a great way around this without using some specialized server software. But given that there will only be potentially eight participants in my presentation, this should not be a problem when I show them the slides next week. Also I will be running the presentation from a server that is not very taxed. It will be interesting to see if there is any real performance issue.

Most of the functionality that I've described is already complete. The system already will show slides and let me select which slide I want to be the active slide. Remaining in the process is producing a nicer administrative interface for pre-configuring the names of guests, and potentially including some of those interactive features that I was describing. I was thinking of making them a bit more elaborate, but I don't think I will have time to do that and produce the material I need for the presentation itself.

Actually, I'm pretty excited about the topic that I'm going to bring to the group, and I'm hoping that I can produce it in a less interactive form for general publication also.

Comments