|
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
|
||||
|
||||
Questions about the Sage Full Client Architecture
This is mainly for Jeff... but anyone can chime in, if they have the answers
I'm curious about how a full client works with SageTV server. I know lots about the MiniClient, and in that case all the data and the UI is still on the server. But with a full client (which only runs on windows), does it have a copy of the database? If so, how does it go about synchronizing from the Server? For video playback, does it use the same server side playback services as the MiniClient? Does the Full client process a UI in the same way as the MiniClient, ie, via a series of drawing commands? Do you think it's possible to completely create a new full client that does not use AWT in any way? (ie, Oracle has deprecated AWT/Swing in favor of JavaFX -- moving forward their focus will be on JavaFX, although they state that AWT/Swing isn't being removed, yet). So the motivations here is two fold. Firstly, understanding how complex the FULL client is, might determine if I ever attempt to create a full client for Android. Creating a FULL client for android would offload the memory requirements from the Server to the Client. Secondly, if oracle were to suddenly drop support for AWT... how would that affect sagetv? From the code, AWT appears to be woven pretty tightly throughout the codebase for the client and server.
__________________
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 |
#2
|
||||
|
||||
I can't answer many of these questions, but I am pretty sure each client has it's own copy of the database. It gets it from the server on startup and then each time there is a change the client and the server sync.
__________________
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. |
#3
|
|||||
|
|||||
FYI, full client is possible on Linux as well...I just never bothered with it. It would likely just work if you tried to run it.
Quote:
Quote:
Quote:
Quote:
Quote:
__________________
Jeffrey Kardatzke Founder of SageTV |
#4
|
||||
|
||||
Thanks Jeff... that's very helpful. I agree that AWT is not going away, but I thought that SageTV core rendering was a lot more dependent on AWT than what you are saying, so this is good news.
__________________
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 |
#5
|
||||
|
||||
Quote:
__________________
Buy Fuzzy a beer! (Fuzzy likes beer) unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers. Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA. Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S Other Clients: Mi Box in Master Bedroom, HD-200 in kids room |
#6
|
||||
|
||||
Quote:
I'm thinking that for a Full Client mode, I might just do a pure Android App, that provides access to the video library (probably have the concept of vfs/flows) and then allow syncing and playback there. ie, this would have no correlation to SageTV STVs, but rather it would be a pure native app. I'd have to sync the device's database with the server, but I'd probably not use Wiz.bin, since I don't want to load the entire database into memory on a phone/tablet. I don't think this would be a full client in the sense that you could use it to schedule recordings, view the epg, etc, but rather, it would be a stripped down media client that offered some basic features.
__________________
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 |
#7
|
||||
|
||||
Quote:
__________________
Buy Fuzzy a beer! (Fuzzy likes beer) unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers. Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA. Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S Other Clients: Mi Box in Master Bedroom, HD-200 in kids room |
#8
|
||||
|
||||
I'm actually more interested in what would actually need to be 'ported' in this. I'm pretty sure all the UI composition is done in pure java, with theonly platform specific stuff being the native libraries for rendering the UI and video (both of which you've tacked to some extent already with the miniclient), and bringing in Input (also dealt with to some extend in the miniclient). The UI rendering is already modular it seems (hence Jeff's mention of Direct3D and OpenGL renderers) - could probably 'port' your miniclient code into another renderer in that mix. Memory footprint of the program would certainly increase, but so would performance (especially having all the STV content stored locally, and stuff like fanart caching then storing locally as well).
__________________
Buy Fuzzy a beer! (Fuzzy likes beer) unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers. Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA. Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S Other Clients: Mi Box in Master Bedroom, HD-200 in kids room |
#9
|
||||
|
||||
Quote:
Working on SageTV, for me, is a hobby. It's not my job. So, when I spend a couple hours working on stuff, it needs to have a benefit to me, personally. I know there are lots of people that want to drive the areas get the attention, and they can't understand why someone would work on X when Y needs more attention, but the reality, is that when this isn't your job, you end up working on what brings the most value to you, personally. For example, I could have easily worked on the windows installer (glad jusjoken is doing that), or worked on getting the windows binaries compiled, or adding 64bit to windows, but none of that has any value to me. I only bring this up, since, I'm sure many people will look at what I choose to work on, and think, "why is he doing that???", and well, this is why The things are my radar... are finish the miniclient, get jetty 9 working, add a web UI, build a better Android client, and get ARM builds working for the server. Each of those things are things that I vested interest in for one reason or another... it'll likely take me years to get through it (the last one, ARM builds is less important, if I can find a low power, but decent performing, really small form factor x86 board -- NUCs might fit the bill)
__________________
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 |
#10
|
||||
|
||||
Actually the more I think about a "full" client, I realize I don't need a full client. From my phone, there are 2 things that I do daily, and 1 thing that I do occasionally.
1. Check was was recently recorded (wife asks, "is there anything for us to watch") 2. Check was is going to be recorded 3. Schedule new recordings (occasionally) From the Kids POV, they only care about browsing and playing videos on demand. They currently use the Placeshifter on PC, but they'd much rather have a netflix like interface, and just watch it in a browser. Syncing videos to my phone is something I've done rarely, and I can get by with just copying over USB (which is what I tend to do anyways). So, maybe a better Web UI that adapts to smaller screens is a better focus (for me) than spending any amount of time on a native Android Client.
__________________
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
|
||||
|
||||
But if you've already done most of the 'tough' work (the rendering and playback) for sage on the platform, and most the java parts of the client transfer over reasonable well - then why not go the client route, as it would still meet your needs, as well as that of others. Again, this is IF your current work would transfer over - which I think much of it probably would. That will also give you insight into how much of sage.jar transfers cleanly to arm, to aid in your final arm server goal.. :-)
I feel Placeshifter/Miniclient, itself, is really past it's utility at this point. Most hardware that us currently in use for miniclients (especailly going forward) likely could run the full client, without the need for the server to handle the UI. All that is needed is for client to be able to tap into a transcoded stream instead of the untouched one - which should be a relatively minor change.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer) unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers. Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA. Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S Other Clients: Mi Box in Master Bedroom, HD-200 in kids room Last edited by Fuzzy; 01-12-2016 at 08:30 AM. |
#12
|
||||
|
||||
Unrelated to the actual architecture (full or thin client), I do feel there needs to be a mobile theme - ideally as an alternative/option for gemstone. Some mobile-centric flows and a tweaked menu arrangement would likely be enough. That work would aid any future platforms the UI is ported to.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer) unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers. Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA. Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S Other Clients: Mi Box in Master Bedroom, HD-200 in kids room |
#13
|
||||
|
||||
Quote:
Today, updating clients is less of an issue, especially for something like Android TV (apps can auto-update). So, having a MiniClient or Full Client doesn't matter (to me) either way, since updating the client is pretty easy, or even automatic. I don't think much of existing MiniClient work actually transfers all well to a full client. How the UI instructions are handled is completely different, although, in the end, a "renderer" is used to do the actual drawing. But I think there is much more in the MiniClient around image provisioning and caching that I don't think works the same way in a Full Client. 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 |
#14
|
||||
|
||||
Quote:
__________________
Buy Fuzzy a beer! (Fuzzy likes beer) unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers. Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA. Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S Other Clients: Mi Box in Master Bedroom, HD-200 in kids room |
#15
|
|||
|
|||
Quote:
Over time I may take this on but I need to first understand the purpose. One key goal in the past with Gemstone was to leverage that people could still use other plugins as the base of Gemstone is SageTV7.xml STV. This does mean it is LARGE but it helps in the maintenance and flexibility of supporting "most" other plugins. k |
#16
|
||||
|
||||
My point being, is that the MiniClient work, won't likely help here. While you are are right, in that it might just work, I'd have to port/recompile the native code to ARM/Android (sage uses it's own image loading library that is native), and, the full STV renderers on the server will not run, as is, since to run on Android, you need an opengl es version, which sagetv doesn't have. It would take some work to migrate the work done on Android side to make it work like a "renderer" that full client would use. Not mention that I'd have to strip out any java.awt.* reference in the codebase, since Android doesn't java java.awt. Even though the "drawing" renderers on the server, don't rely on awt directly (except the Java2d one), they all make extensive use of Rectangle and Color objects which don't exist on Android. That was one of the first things I had to do when I moved code to android, was strip out those references and replace with my own objects. This all goes back to Jeff's comment that if I were to do this, I'd likely be taking a copy of the entire SageTV codebase, and then ripping it apart to work on Android (which is exactly what I did for the MiniClient, but it was only a handful of files). In the end it would be a new project.
__________________
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 |
#17
|
||||
|
||||
Quote:
Most of the flows also do not work as well (though some can be done as is with the adjustments that are there). The bigger issue, is I don't believe the flows respond to click events at all, making navigation on a touch screen very limited (only navigating with directional swipes).
__________________
Buy Fuzzy a beer! (Fuzzy likes beer) unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers. Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA. Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S Other Clients: Mi Box in Master Bedroom, HD-200 in kids room |
#18
|
||||
|
||||
Quote:
My feeling is that if you pull up the default STV or the Gemstone on a Phone, and interact with it, you get a sense for you don't like The default STV is built with a mouse or remote in mind, so interacting from a Phone using touch is awkward. For example, lists, with scrollbars are not very user friendly. On some places where you need to "click" an icon, the icon an be pretty small and you end up hitting something else. I'm not 100% sure what a mobile theme should be... I just know what it should not be To create a truly good experience it might require changes to there server (maybe new commands, actions, events, like handling screen rotation, etc), and definately things in the UI like larger buttons, etc.
__________________
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 |
#19
|
|||
|
|||
Quote:
k |
#20
|
||||
|
||||
Quote:
in any case, implementing swipes and drags is a multi-part job. Events need to be created in the server to handle them - the miniclient needs to detect and send them, and the UI needs to handle them. I don't think any of these are impossible - but it will definitely take the work of multiple devs to get it dealt with.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer) unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers. Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA. Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S Other Clients: Mi Box in Master Bedroom, HD-200 in kids room |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sage 6 Client: When HTPC wakes from sleep, restore Sage to full screen? | sjrx0213 | SageTV Software | 2 | 12-21-2010 01:07 PM |
Sage Client (v5) Issue: Switch to Full screen causes crash | Rori | SageTV Software | 1 | 08-18-2006 04:47 PM |
Use full-install Sage as client? | elaw | SageTV Software | 11 | 01-27-2006 03:09 PM |
Optimal Architecture - How To use Sage.Server, Sage.Client and Sage.Recorder together | edbmdave | SageTV Software | 4 | 08-24-2004 04:35 PM |
SageTV Client<-> Master Architecture question | IVB | SageTV Software | 4 | 11-12-2003 08:00 PM |