Solved

REST Design

Posted on 2014-03-28
2
231 Views
Last Modified: 2014-04-20
Consider this scenario

Sensor asset streaming ‘live’ media (media = ‘video’).
‘live’ media can be archived (client driven).  
Archived media can be searched (There’s metadata so keyword searches can be performed)
Archived media can be streamed (effectively this video on demand)


At issue, I’m struggling to define resource representations that make a clear distinction  between ‘live’ video and ‘video on demand’ (archived media being streamed)

 

1.     Get live media  
GET /livemedia
2.     Get live media based on Keyword  
GET /livemedia?q={keyword}  
3.     Get archived media    
GET /archivedmedia
4.     Get archived media based on Keyword,etc (timestamp)
 
GET /archivedmedia?q={keyword}}&ts={timestamp}  

5.     Stream archived media (hence video on demand) using uuid from response in 3 and 4 above…    
POST /mediaondemand/{uuid}  

The representation in 5) now introduced  
GET /mediaondemand  

An alternate representation considered is as follows eliminates the 'archived media' representation:

1.     Get live stream
GET /stream/live
2.     Get live stream based on Keyword  
GET /stream/live/{keyword}  
3.     Get on-demand stream    
GET /stream/on-demand
4.     Get on-demand stream based on Keyword,etc (timestamp)
 
GET /stream/on-demand/{keyword}&ts={timestamp}


5.     Stream archived media on-demand (hence video on demand) using uuid from response in 3 and 4 above…    
POST /stream/on-demand/{uuid}  

6.  Search for 'archived media'.
GET /search?={keyword}

Thoughts on the above?  I’m open to alternate composites and representations.
0
Comment
Question by:forums_mp
2 Comments
 
LVL 96

Accepted Solution

by:
Bob Learned earned 100 total points
ID: 39963731
You can drive yourself crazy if you try to get the perfect "distinction".  

How important is it to get the perfect combination?  

I like this section:

1.     Get live media  
GET /livemedia
2.     Get live media based on Keyword  
GET /livemedia?q={keyword}  
3.     Get archived media    
GET /archivedmedia
4.     Get archived media based on Keyword,etc (timestamp)
 
GET /archivedmedia?q={keyword}}&ts={timestamp}  
5.     Stream archived media (hence video on demand) using uuid from response in 3 and 4 above…    
POST /mediaondemand/{uuid}
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39964197
+1 "You can drive yourself crazy if you try to get the perfect "distinction".
http:#a39963731 That looks good

<<no points>>
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

New Relic recently released its Synthetics product that allows for the creation of performance monitors that periodically test a site's performance. If you wish to test an interactive workflow New Relic employs Selenium WebDriverJS to run those test…
The task of choosing a web design company to build a website for your business should never be taken in a light manner. Provided the fact that your website will act as a representative to your business and will be responsible for imposing an online …
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now