Solved

REST Design

Posted on 2014-03-28
2
234 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to force/Manually add authenticaion to POST WebRequest 14 75
Problems Google Cloud Printing on SAAS 3 64
wcf vs wev services 2 169
fiddler with asp.net mvc 2 60
When coding a Webservice to provide data, the normal way is to create a method that returns a Dataset object.   But a Dataset cannot be used easily from another platform, such as PHP,  FLAS (FLEX) , etc. Solution : Return a XML Document instea…
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 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…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

860 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