Over a million developers have joined DZone.

Controlling Distributed Presentations

DZone's Guide to

Controlling Distributed Presentations

· Java Zone
Free Resource

What every Java engineer should know about microservices: Reactive Microservices Architecture.  Brought to you in partnership with Lightbend.

In a previous post, I talked about how a projector failure at the 010DEV event resulted in the presentation using laptops, smartphones and tablets to display the slides. One of the problems here, as noted by speaker Trisha Gee, is that on every device the next slide must be manually selected.

A couple of weeks ago, I came up with the idea of FilthyHackFriday – the idea being that you take a problem, and code up a quick’n'dirty solution in 30 minutes as a proof of concept. For my first FHF project, I chose to address this problem and wrote DistPres. It lets you upload Powerpoint or PDF presentations and converts each slide to an image. When you view a presentation, AJAX polling checks for changes to the current slide index and updates the view accordingly. You can control the presentation using the left and right arrow keys, and reset it to the first slide using the R key.

The use-case for this as follows. You’re in an upstairs room in a bar, trying to give a presentation but the projector doesn’t want to join in. So, you fire up DistPres and upload your presentation. Everyone points their device to your web server, and selects the correct presentation. From that point on, every time you change a slide everyone else will get the new slide automatically within a second.

- It’s quick and dirty, but it works.
- With some cleaning up it could actually be pretty handy.
- It’s written using Play 2
- Originally I wrote it using WebSockets, but that automatically excludes certain browers and devices. AJAX polling opens the field a bit more.

You can find the code on GitHub here, or download it directly from here.

Microservices for Java, explained. Revitalize your legacy systems (and your career) with Reactive Microservices Architecture, a free O'Reilly book. Brought to you in partnership with Lightbend.


Published at DZone with permission of Steve Chaloner, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}