broadcasting music from the cloud
DESCRIPTION
Using Spotify and Windows Azure websites to distribute music. This includes ASPNET SignalR. Prepared for ITCAMP.ROTRANSCRIPT
![Page 1: Broadcasting music from the cloud](https://reader035.vdocuments.us/reader035/viewer/2022062513/55526759b4c9052e1f8b4fb6/html5/thumbnails/1.jpg)
itcampro@ itcamp13# Premium conference on Microsoft technologies
Broadcasting Music from the Cloud
Andy CrossWindows Azure MVP
Elastacloud@andybareweb
blog.elastacloud.com
![Page 2: Broadcasting music from the cloud](https://reader035.vdocuments.us/reader035/viewer/2022062513/55526759b4c9052e1f8b4fb6/html5/thumbnails/2.jpg)
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private & Public CloudHuge thanks to our sponsors!
![Page 3: Broadcasting music from the cloud](https://reader035.vdocuments.us/reader035/viewer/2022062513/55526759b4c9052e1f8b4fb6/html5/thumbnails/3.jpg)
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private & Public Cloud
• Real Time Web• Social media is the new telephone• Spotify API• Synchronicity • SignalR• Windows Azure Websites• Service Bus• ROCK!!!
Agenda
![Page 4: Broadcasting music from the cloud](https://reader035.vdocuments.us/reader035/viewer/2022062513/55526759b4c9052e1f8b4fb6/html5/thumbnails/4.jpg)
itcampro@ itcamp13# Premium conference on Microsoft technologies
REAL TIME WEBWhat is the
Any sufficiently advanced technology is indistinguishable from magic.
Arthur C Clarke
![Page 5: Broadcasting music from the cloud](https://reader035.vdocuments.us/reader035/viewer/2022062513/55526759b4c9052e1f8b4fb6/html5/thumbnails/5.jpg)
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private & Public Cloud
• A history!– HTML– Javascript– Iframes– XmlHttp– AJAX– JSONP–Web Sockets
Real Time Web
Propensity to push
![Page 6: Broadcasting music from the cloud](https://reader035.vdocuments.us/reader035/viewer/2022062513/55526759b4c9052e1f8b4fb6/html5/thumbnails/6.jpg)
itcampro@ itcamp13# Premium conference on Microsoft technologies
Facebooks’ Real Time WebFacebook has multiple real time web features, such as the news feed and messaging
![Page 7: Broadcasting music from the cloud](https://reader035.vdocuments.us/reader035/viewer/2022062513/55526759b4c9052e1f8b4fb6/html5/thumbnails/7.jpg)
itcampro@ itcamp13# Premium conference on Microsoft technologies
Twitters’ Real Time WebTwitter is perhaps the ultimate in real time web opportunities, but even it struggles with *n more tweets*
![Page 8: Broadcasting music from the cloud](https://reader035.vdocuments.us/reader035/viewer/2022062513/55526759b4c9052e1f8b4fb6/html5/thumbnails/8.jpg)
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private & Public Cloud
• With great advantages– Instant messaging– Responsive user interfaces– Collaboration and sharing
• Come some great problems– Scalability• Concurrent connections• Server load
– Complexity of client
Real time web pitfalls
![Page 9: Broadcasting music from the cloud](https://reader035.vdocuments.us/reader035/viewer/2022062513/55526759b4c9052e1f8b4fb6/html5/thumbnails/9.jpg)
itcampro@ itcamp13# Premium conference on Microsoft technologies
SOCIAL MEDIAIf you want to share music, the 1990s were better than
![Page 10: Broadcasting music from the cloud](https://reader035.vdocuments.us/reader035/viewer/2022062513/55526759b4c9052e1f8b4fb6/html5/thumbnails/10.jpg)
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private & Public Cloud
• Billions of users of facebook• Imagine sharing music on there. – READY. STEADY. GO!!!
• My real time is not your real time• If we want to build engagement on– Brand– Concept–Movement
• we must engage simultaneously
Social Media
![Page 11: Broadcasting music from the cloud](https://reader035.vdocuments.us/reader035/viewer/2022062513/55526759b4c9052e1f8b4fb6/html5/thumbnails/11.jpg)
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private & Public CloudThe Real Time Web
![Page 12: Broadcasting music from the cloud](https://reader035.vdocuments.us/reader035/viewer/2022062513/55526759b4c9052e1f8b4fb6/html5/thumbnails/12.jpg)
itcampro@ itcamp13# Premium conference on Microsoft technologies
SPOTIFYBroadcast Music to
![Page 13: Broadcasting music from the cloud](https://reader035.vdocuments.us/reader035/viewer/2022062513/55526759b4c9052e1f8b4fb6/html5/thumbnails/13.jpg)
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private & Public Cloud
• Spotify is a 4 year old ‘start up’– Streaming music– Integrated apps
• Apps are written in HTML5 and JS– Chromium Embedded
• Its API for apps gives every song a URI– spotify:track:12345679abc
• We will distribute these URIs along with a Play command
Spotify
![Page 14: Broadcasting music from the cloud](https://reader035.vdocuments.us/reader035/viewer/2022062513/55526759b4c9052e1f8b4fb6/html5/thumbnails/14.jpg)
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private & Public Cloud
function playTrack(data) { console.log(data); player.playTrack(models.Track.fromURI(data)).done(function () { //this is a promise update the ui maybe });
Example Spotify code
![Page 15: Broadcasting music from the cloud](https://reader035.vdocuments.us/reader035/viewer/2022062513/55526759b4c9052e1f8b4fb6/html5/thumbnails/15.jpg)
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private & Public Cloud
• Introducing Goose• Geese fly together.• Geese fly in flocks.• There is a lead goose in the flock• The rest are tail geese.• Geese honk• Geese sing• Geese flap
Using the Real Time Web to fix this
![Page 16: Broadcasting music from the cloud](https://reader035.vdocuments.us/reader035/viewer/2022062513/55526759b4c9052e1f8b4fb6/html5/thumbnails/16.jpg)
itcampro@ itcamp13# Premium conference on Microsoft technologies
SYNCHRONICITY?But how do we achieve
![Page 17: Broadcasting music from the cloud](https://reader035.vdocuments.us/reader035/viewer/2022062513/55526759b4c9052e1f8b4fb6/html5/thumbnails/17.jpg)
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private & Public Cloud
• We can send a Play command to individuals.
• How can we combine the Real Time Web with this?
My real time is not your real time
![Page 18: Broadcasting music from the cloud](https://reader035.vdocuments.us/reader035/viewer/2022062513/55526759b4c9052e1f8b4fb6/html5/thumbnails/18.jpg)
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private & Public Cloud
• We cannot just send PLAY commands–What if we join part way through a song– Nothing would be played until we
completed the song
• We also track the LEAD GOOSE’s position
My real time is not your real time
![Page 19: Broadcasting music from the cloud](https://reader035.vdocuments.us/reader035/viewer/2022062513/55526759b4c9052e1f8b4fb6/html5/thumbnails/19.jpg)
itcampro@ itcamp13# Premium conference on Microsoft technologies
ASP.NET SIGNALRTechnologies for the Real Time Web
![Page 20: Broadcasting music from the cloud](https://reader035.vdocuments.us/reader035/viewer/2022062513/55526759b4c9052e1f8b4fb6/html5/thumbnails/20.jpg)
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private & Public CloudWhat does SignalR try to fix?
Got Data?Got Data?Got Data?Got Data?
Here’s some data!
Got Data?Got Data?Got Data?
Got Data?
ServerClient
![Page 21: Broadcasting music from the cloud](https://reader035.vdocuments.us/reader035/viewer/2022062513/55526759b4c9052e1f8b4fb6/html5/thumbnails/21.jpg)
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private & Public CloudHow does it fix it?
ServerClient
I do real time, do you?
Yeah, dude!
Let’s Party in Real-time!
![Page 22: Broadcasting music from the cloud](https://reader035.vdocuments.us/reader035/viewer/2022062513/55526759b4c9052e1f8b4fb6/html5/thumbnails/22.jpg)
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private & Public CloudComponents
![Page 23: Broadcasting music from the cloud](https://reader035.vdocuments.us/reader035/viewer/2022062513/55526759b4c9052e1f8b4fb6/html5/thumbnails/23.jpg)
itcampro@ itcamp13# Premium conference on Microsoft technologies
WINDOWS AZURE WEBSITES
Scalable Hosting
![Page 24: Broadcasting music from the cloud](https://reader035.vdocuments.us/reader035/viewer/2022062513/55526759b4c9052e1f8b4fb6/html5/thumbnails/24.jpg)
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private & Public Cloud
• Start on Free – And continue for dev/test
• Production uses Reserved Mode– Custom URL– Scalable as easily as:
Not a lightweight option
![Page 25: Broadcasting music from the cloud](https://reader035.vdocuments.us/reader035/viewer/2022062513/55526759b4c9052e1f8b4fb6/html5/thumbnails/25.jpg)
itcampro@ itcamp13# Premium conference on Microsoft technologies
SERVICE BUS BACKPLANESignalR scale out
![Page 26: Broadcasting music from the cloud](https://reader035.vdocuments.us/reader035/viewer/2022062513/55526759b4c9052e1f8b4fb6/html5/thumbnails/26.jpg)
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private & Public CloudScaling with the Service Bus
![Page 27: Broadcasting music from the cloud](https://reader035.vdocuments.us/reader035/viewer/2022062513/55526759b4c9052e1f8b4fb6/html5/thumbnails/27.jpg)
itcampro@ itcamp13# Premium conference on Microsoft technologies
ROCK! HONK! Enough talk!
![Page 28: Broadcasting music from the cloud](https://reader035.vdocuments.us/reader035/viewer/2022062513/55526759b4c9052e1f8b4fb6/html5/thumbnails/28.jpg)
itcampro@ itcamp13# Premium conference on Microsoft technologies
Q & A