| By Jonas Jacobi | Article Rating: |
|
| June 4, 2014 03:05 PM EDT | Reads: |
569 |
I had the great privilege of being a speaker at HTML5 Developer Conference in San Francisco recently. It was the second HTML5 Dev Conf I have presented at, with the first one being October 2013. This time, I paired with Frank Greco to present a session entitled “WebSockets: Past, Present and Future”. Frank took the stage for the first half of the session, and I followed up with some hands-on Internet of Things (IoT) demonstrations that were integrated with Kaazing Gateway.
Introducing the Tic Tac Toe Light
My personal favorite demonstration was a project I called the “Tic Tac Toe Light”. I called it this because the custom-built enclosure houses nine (9) Adafuit NeoPixels in a three-by-three (3×3) grid. The enclosure, made using foam core board and a hot knife, also contained an Arduino Yun. I have grown to be a big fan of the Arduino Yun for real-time IoT/web projects. The board is the same profile as an Arduino Uno, but includes integrated wireless (802.11 b/g/n), an ATmega32u4 (similar to the Arduino Leonardo), and a Linux system on a chip (SoC).
Using a web-based user interface, attendees of the HTM5 Dev Conf session could use their laptop, tablet or smartphone to control each NeoPixel (RGB LED) in the enclosure. At the same time, the web user interface kept in sync with all the attendees selections – across all screens. The Arduino Yun was also listening on a real-time connection for color change messages, which is how it knew what lights to change to what colors.
Why Kaazing Gateway
I think the bigger question here is “Why real-time?” Although I do not know the exact count, I would say that the session had nearly 200 attendees. The ATmega32u4 has a clock speed of 16 MHz with 32 KB of RAM. If all those attendees were selecting light colors at anywhere near the same time using HTTP, the Arduino would be crushed under the load. In a real-time scenario however, there is but one connection, and about twenty (20) bytes of data for each color change. The end result was a far more scalable solution.
And it had to scale too! The lights on the Tic Tac Toe box were blinking wildly for the duration of the time I had it plugged in (before I had to move on to my next demonstration).
Can you imagine the user experience over HTTP, even if the 16 MHz chip could handle the load? You would select a color, and at some interval later, the color would be set. That lag however would leave you wondering “Was that my color selection?” This as compared to an instant response using Kaazing Gateway, even over conference wireless. Not to mention keeping all the other connected users in sync. The additional HTTP polling load for that would make the whole project come to a crawl (or just crash).
What Next
The 3×3 grid was actually happenstance – I happened to have ten (10) NeoPixels on hand in my component drawer. I wanted a square, so 3×3 it was. This led to the name of Tic Tac Toe. But then I started to wonder. What if this was the physical manifestation of two players in an actual game of tic-tac-toe? Or even better yet, maybe artificial intelligence (AI) on the server was playing the other side in real-time!
This is where I would like to take the project next. If you want to see the code for the project, you can hop on over to my GitHub account where I have posted more details, as well as code itself for the Arduino Yun and the web client. The fabrication plans are also posted there should you want to take on a project like this yourself. If you have any questions, feel free to hit me up on Twitter, or drop a comment below.
Credits
Thanks Matthias Schroeder for the Vine video of Tic Tac Toe in action during the session.
Read the original blog entry...
Published June 4, 2014 Reads 569
Copyright © 2014 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Jonas Jacobi
Jonas has 21 years of experience leading the development of innovative technology products and services. Together with Kaazing’s Co-Founder & CTO John Fallows, he pioneered and championed the groundbreaking HTML5 WebSocket standard. Prior to co-founding Kaazing he served as VP of Product Management for Brane Corporation, a Silicon Valley startup dedicated to developing a market-leading enterprise platform for building model-driven apps. Before Brane, he spent 8+ years at Oracle where he served as a Java EE and open source Evangelist, and was Product Manager in the Oracle Application Server division for JavaServer Faces, Oracle ADF Faces, and Oracle ADF Faces Rich Client. He is a frequent speaker at international conferences on accelerating and scaling secure enterprise-grade WebComms (Web Communications).
- How to Develop Apps for Vehicles
- Dell & Red Hat Deliver Enterprise-Grade, OpenStack Private Cloud Solution
- MapDB: The Agile Java Database
- More Mainstream Businesses Depend on Open Source
- Canonical: Ubuntu 14.04 LTS the cloud platform of choice
- OpenStack: The Platform of Choice for Cloud
- AMAG, HP, ImageWare Systems, March Networks and StrikeForce Discuss Security Solutions in SecuritySolutionsWatch.com Interviews
- Developers: The New Kingmakers
- Canonical: Ubuntu 14.04 LTS die Cloud-Plattform Ihrer Wahl
- Top Six Ruby on Rails Deployment Methods in AWS: Pros & Cons
- ZFS on Linux
- Lunch Power Panel | How Open Source Is Speeding Cloud Innovation
- How to Develop Apps for Vehicles
- Open Source IoT at Eclipse: Frameworks & Tools for IoT Developers
- Interop Las Vegas Previews Announcements From More Than 100 Exhibitors and Sponsors
- Dell & Red Hat Deliver Enterprise-Grade, OpenStack Private Cloud Solution
- MapDB: The Agile Java Database
- MBaaS, Cloud Computing and Architectures for Enterprise Mobility - What Your Mother Never Told You
- March 2014 StorageIO Update Newsletter : Cisco Cloud, VMware VSAN and More
- More Mainstream Businesses Depend on Open Source
- OpenStack and the Future of Computing
- How the Norwegian Red Cross Built a Video Tutoring Solution with WebRTC
- Cisco Continues to Drive Data Center Innovation: New High Performance Nexus 9000 Switches for Application Centric Infrastructure; New Nexus 3000 Switch for Cloud Providers
- Survey Highlights Shifts in IT-enabled Business Innovation, Changing Role of the CIO
- After Ubuntu, Windows Looks Increasingly Bad, Increasingly Archaic, Increasingly Unfriendly
- SCO CEO Posts Open Letter to the Open Source Community
- Where Are RIA Technologies Headed in 2008?
- Simula Labs Launches Hosted Delivery Platform To Enable Enterprise Open Source Adoption
- Source Claims SCO Will Sue Google
- How Open Is "Open"? – Industry Luminaries Join the Debate
- Latest SCO News is Plain Weird
- SCO Claims Linux Lifted ELF
- Developing an Application Using the Eclipse BIRT Report Engine API
- Flashback: Investing in 'Professional Open Source' - Exclusive 2004 Interview with David Skok, Matrix Partners
- IBM Tells SCO Court It Can't Find AIX-on-Power Code
- Should RIM BlackBerries Be Rented?























