Rondetafel bijeenkomst MediaMosa -17 november 2011
MediaMosa and webservices
1. MediaMosa and Webservices easy access to MediaMosa content Expertise seminar MediaMosa – 25 november 2010 - Herman van Dompseler & Connect Communicate
2. Back in 2007 SURFnet videoservices basedon a Service OrientedArchitecture Currentresult: Frontend: SURFmedia + End User Applications Backend: MediaMosa
3. Big roleforwebservices Webservices are the onlymeans of communicationbetweenMediaMosa and End User Applications That’s a goodthing, seperation of concerns Frontend is concerned withpresentation Backend is concerned with data
4. How do theyconnect? Trust relation End User Applicationsapplyfor a key to useMediaMosa. End User Applicationsauthenticateusingthiskey and DBUS authentication End User Applications have access to their part of MediaMosa data
5. How do theycommunicate? Webservice request REST url GET /asset (with a lot of parameters) http://www.mediamosa.org/node/218114 Webservice response MediaMosa XML format
8. And itworks NOT likethis But… End usersdo notcommunicatedirectlywithMediaMosa All communications is doneusing End User Applications There is nopublic entranceto MediaMosa (entrance is basedon the trust relation) There is nostandard XML response format
9. Now in 2010 Technology scouting ‘Open Webservices’ Goal: “to provide an open interface forsharing data stored in anMediaMosa environment” “to consume data from other open platforms and to integratethis in MediaMosa” Side effects: New target audience: end users Public entrancewith easy access Standard XML response
11. There is input and output Content goestwoways Use the Open API to retrieve data fromMediaMosa This is the easy part Use the Open API to update data in MediaMosa. This is more difficult
12. How to connectto Open API? Public Access The Open API is public withanurllike: api.mediamosa.org
13. How to communicatewith Open API? Webservice request REST url GET /search with standaard parameters like query, limit, order. Webservice response Standard XML format RSS Atom Json
16. How to connectfor updates? The more difficult part Same public url: api.mediamosa.org Need user management NeedOauthfor user authentication Needapplicationkeyfortrackingapplication and ratelimiting (notforauthorization)
17. How to communicatefor updates? Webservice request REST url POST /user/[ID]/uploadfor a ‘new’ entry. PUT /user/[ID]/upload/[ID2] for updating an entry DELETE /user/[ID]/upload/[ID2] fordeletingan entry Content is in Atomformat, calledAtomPub. Webservice response Standard XML format Atom
19. A couple of examples Have younoticedthis? The difference in XML response MediaMosa XML: http://api.mediamosa.surfnet.nl/displayXML Atom XML: http://api.mediamosa.surfnet.nl/search?query=html5 ComparewithYouTube XML http://gdata.youtube.com/feeds/api/videos?q=html5&max-results=10&v=2 End users UseAtomfeed in iGoogle http://www.google.nl/ig Developers Createmashups http://api.mediamosa.surfnet.nl/cockpit?query=html5
22. Wrap up The current status Open Webservices givenewfunctionality to MediaMosa Public entrance Standard XML response Open webservices introducenewaudiences: End users (Mashup) developers The Proof Of Concept shows thatitcanbedone. It’s nothereyet, but we keep youposted.
23. Is itrocketscience? We use open standards, likeothers do YouTube: Atomfeed http://code.google.com/intl/nl/apis/youtube/2.0/developers_guide_protocol_understanding_video_feeds.html Twitter: Oauthexample http://dev.twitter.com/pages/auth 75 more Video API’s http://www.programmableweb.com/apis/directory/1?apicat=Video
24. Easy access to MediaMosa Content What’s in itfor me? End user direct access to MediaMosa content Developer easy integration of MediaMosa content in website, ELO, etc.