|
SageTV Github Development Discussion related to SageTV Open Source Development. Use this forum for development topics about the Open Source versions of SageTV, hosted on Github. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||||
|
||||
Remote SageClient Possible?
One of the issues I am having with my Echo skill is the latency involved with using sagex to fetch information from the Sage server. One way to solve this would be to have a synced copy of the wiz.bin on the same web server as the Echo skill backend.
I know the SageClient does this already but it only works on a local network. Placeshifter works over a network but doesn't keep a local copy of the wiz.bin. Would it be possible to combine the two features? No UI would be needed. I can see this functionality being useful for other applications. If anybody decided to integrate Sage with Google Home for example. Thoughts?
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#2
|
||||
|
||||
Quote:
I have an Echo Dot, and when I walk into a room, and say, "Alexa, turn on the light", there's about 1-2 second delay before the light comes on, and these things are on the same home network. I'm not familiar with the architecture of how you've integrated Echo and SageTV, but, in general, on the same network, sagex REST apis are extremely fast... in many cases less than 50ms-100ms. If the data coming back is 1000s of movies, then you'll get some delay there, because the size of the message is so large. But for messages in the 1-5k range, those should be almost instant. Do you have some examples of APIs that are taking a long time? It takes a fair bit of work to create a data sync and keep things in sync, and do it efficiently. I'd hate to see you spend 2-3 weeks doing it, only to discover there is only a marginal performance increase, with huge code complexity.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#3
|
||||
|
||||
Quote:
- To implement some functionality I need to make many (possibly hundreds, or thousands - it depends on the number of Airings in the DB) of sagex calls. This slows things down a lot. - I'm using Amazon's Lambda to process requests and it's totally stateless. The only way to pass anything but the simplest pieces of info between user utterances is to save it to the DynamoDB, which is slow. If I had the DB locally I could quickly rebuild the data I need. - Passing large numbers of complex objects (like Airings) is slow. (I tried only passing the fields I need instead of the whole Airings but this is only marginally better since I need many of the fields.) What I am doing now works but has limitations. I currently save lists of AiringIDs to a DynamoDB and then when I need to get detailed information I get the Airing Object from the server.
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#4
|
||||
|
||||
And you can run SageTVClient over the Internet...you just need to have the right ports open to do it (the main downside being there is no security preventing somebody else from connecting; so it'd probably be a better idea to do something like port forwarding over SSH). You'll need port 42024...and if you want to play stuff back, you'll also need 7818 for streaming. I *think* that should do it. I know I haven't tried that in a long time. Performance likely may not be that great since there'll be a decent amount of latency in server RPCs and we never designed SageTVClient to perform well in that kind of scenario (but with the V9 changes, this client won't slow down what's happening on the server which would have occurred in V7).
__________________
Jeffrey Kardatzke Founder of SageTV |
#5
|
||||
|
||||
Quote:
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#6
|
||||
|
||||
Quote:
- "Alexa, open SageTV" - "Get all recordings" - "Filter out the watched recordings" - "Group them by title" - "Sort them the episodes by date recorded" This is just an example of how a user could build a "virtual view". The point is there are lots of cases where I am working with many Airings.
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#7
|
||||
|
||||
Quote:
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#8
|
||||
|
||||
Quote:
Quote:
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#9
|
||||
|
||||
Quote:
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#10
|
||||
|
||||
Quote:
In my understanding, Alexa, is just remote controlling SageTV. So in the case of what you described, no large amounts data need to be transferred to alexa... You - "Alexa, Open SageTV" Server - gets "session id" (not sure what else "open sagetv does") Alexa - "ok" You - "Get All Recordings" Server - gets all recording and stores them under the session id on the server. returns "ok" Alexa - "ok" You - "Filter out watched recordings" Server - uses the session id to find the list of recordings, then filters by watched, stores result in the server for the session id. Returns "ok" Alexa - "ok" You - "Group them by title" Server - uses the session id to find the list of filtered recordings, groups them, puts then in the session on the server. Returns "ok" Alexa - "ok" You - "Sort them the episodes by date recorded" Server - uses the session id to find the list of grouped recordings, groups them, puts then in the session on the server. Returns "ok" Alexa - "ok" You - "What is next recording?" Server - uses the session id to find the list of recordings, gets the first recording, sends it back. Returns JSON airing details for that ONE recording. Alexa - "The next recording is Colony, season 2 episode 2. In this episode ...." You - "Play the next recording?" Server - uses the session id to find the list of recordings, gets the first recording, tells sagetv to play it. return "ok" Alexa - "ok" So, in this dialog... until alexa needs to actually speak something about the data, nothing is really returned back, except that it worked. All the data is held on the server, and in each case, Alexa is just sending it's session id, so that you can find the data associated with the session, but nothing more than a few bytes is ever sent, either way.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#11
|
||||
|
||||
Quote:
How would I store the information using JavaScript? Can I declare static variables that are preserved for as long as the Sage server is running?
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#12
|
||||
|
||||
Quote:
You can still do it all in JS, but it would likely require that you at least have 1 small java api that allows you to statically set a name value pair in static memory, because you are right, the JavaScript calls themselves are, for the most part, stateless.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to get Fan Art on SageClient? | pingmustard | SageTV v7 Customizations | 2 | 04-03-2011 03:19 AM |
SageClient with USBUIRT and Hauppauge 45 button remote map?? | Stuntman | Hardware Support | 1 | 02-28-2009 08:03 PM |
Q: SageClient mode w/ Sage Service not saving into SageClient.properties | laurenglenn | SageTV Software | 2 | 06-17-2007 09:22 PM |
USB-IRT on SageClient with Hauppauge Remote... | Stuntman | SageTV Software | 5 | 12-07-2004 09:22 PM |
Remote stops working with .16 SageClient | ben_gb | SageTV Beta Test Software | 2 | 04-19-2004 08:15 PM |