mediamosa and webservices
DESCRIPTION
Presentation by Herman van Dompseler at the MediaMosa Community day november 25th at SURFnetTRANSCRIPT
MediaMosa and Webservices
easy access to MediaMosa content
&Connect Communicate
Expertise seminar MediaMosa – 25 november 2010 - Herman van Dompseler
Back in 2007
SURFnet videoservices based on a Service Oriented Architecture
Current result:◦Frontend: SURFmedia + End User Applications ◦Backend: MediaMosa
Big role for webservices
Webservices are the only means of communication between MediaMosa and End User Applications
That’s a good thing, seperation of concerns◦Frontend is concerned
with presentation◦Backend is concerned
with data
How do they connect?
Trust relation
End User Applications apply for a key to use MediaMosa.
End User Applications authenticate using this key and DBUS authentication
End User Applications have access to their part of MediaMosa data
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
MediaMosa XML
Example: /asset
and it worksthat’s why we are here today
And it works NOT like this
But…
1. End users do not communicate directly with MediaMosa
◦ All communications is done using End User Applications
2. There is no public entrance to MediaMosa (entrance is based on the trust relation)
3. There is no standard XML response format
Now in 2010
Technology scouting ‘Open Webservices’
Goal:1. “to provide an open interface for sharing data stored
in an MediaMosa environment”2. “to consume data from other open platforms and to
integrate this in MediaMosa”
Side effects:◦New target audience: end users◦Public entrance with easy access ◦Standard XML response
What is needed?
Open API
There is input and output
Content goes two ways
1. Use the Open API to retrieve data from MediaMosa
◦ This is the easy part
2. Use the Open API to update data in MediaMosa.
◦This is more difficult
How to connect to Open API?
Public Access
The Open API is public with an url like:◦api.mediamosa.org
How to communicate with Open API?
Webservice request◦REST url
GET /search with standaard parameters like query, limit, order.
Webservice response◦Standard XML format
RSS Atom Json
Atom
Example: /search
MediaMosa XML vs. Atom
What’s the difference?
How to connectfor updates?
The more difficult part
Same public url:◦api.mediamosa.org
Need user managementNeed Oauth for user authenticationNeed application key for tracking
application and rate limiting (not for authorization)
How to communicatefor updates?
Webservice request◦REST url
POST /user/[ID]/upload for a ‘new’ entry. PUT /user/[ID]/upload/[ID2] for updating an entry DELETE /user/[ID]/upload/[ID2] for deleting an entry
◦Content is in Atom format, called AtomPub.
Webservice response◦Standard XML format
Atom
Finally… demo’sfor end users & developers
http://api.mediamosa.surfnet.nl/
A couple of examples
Have you noticed this?
The difference in XML response◦ MediaMosa XML: http://api.mediamosa.surfnet.nl/displayXML
◦ Atom XML: http://api.mediamosa.surfnet.nl/search?query=html5
Compare with YouTube XML◦ http://gdata.youtube.com/feeds/api/videos?q=html5&max-results=10&v=2
End users◦ Use Atom feed in iGoogle◦ http://www.google.nl/ig
Developers◦ Create mashups◦ http://api.mediamosa.surfnet.nl/cockpit?query=html5
Next: Content in the cloud
Next: MediaMosa & Opencast
Wrap up
The current status
Open Webservices give new functionality to MediaMosa◦ Public entrance◦ Standard XML response
Open webservices introduce new audiences:◦ End users◦ (Mashup) developers
The Proof Of Concept shows that it can be done.
It’s not here yet, but we keep you posted.
Is it rocket science?
We use open standards, like others do
YouTube: Atom feed◦ http://code.google.com/intl/nl/apis/youtube/2.0/developers_guide_protocol_unders
tanding_video_feeds.html
Twitter: Oauth example◦ http://dev.twitter.com/pages/auth
75 more Video API’s◦ http://www.programmableweb.com/apis/directory/1?apicat=Video
Easy access to MediaMosa Content
What’s in it for me?
End user◦direct access to
MediaMosa content
Developer◦easy integration of
MediaMosa contentin website, ELO, etc.