|
SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
Clients
I have a question on how clients operate. I have a implementation class and it works fine on the server (it saves information to a folder and updates on a timer).
What is the preferred method to give client computers access to that file? I am guessing I need to put a IfClients on the implementation class and just copy the file from the server. My questions is do implementation classes call Run() when clients are started? Sorry I don't run clients and just trying to grasp how they work without having to setup a VM. |
#2
|
||||
|
||||
There are a couple different file access API calls. Some will access files in the 'local' filesystem (which on the server or miniclients/extenders, is the server's filesystem; on a client this would be the client's filesystem). There are other API calls that access the file on the server's filesystem, regardless if called from server or client.
__________________
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 |
#3
|
||||
|
||||
Quote:
To pass data between the client and server I generally use the UserRecord API because it stores data in the wiz.bin which is accessible from client or server. Depending on what I am trying to do I either use polling or a SageEvent to let the server know the client needs something to happen. Be very careful accessing files, a Fuzzy mentioned sometime the APIs give you paths that work only on the server. You also have to remember that the client and server may be different operating systems which use different path separators. It gets messy real fast Let me know what you are trying to do, maybe I can give you more detailed "do and don't" information.
__________________
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
|
|||
|
|||
I think that gives me what I needed thank you. I basically write a JSON file to a server location and I just need to copy that JSON file to the client pc shouldn't be a big deal just have to get the code done to do it.
Now keeping it updated and such will require checks against modified time should be fun Thanks for the pointers not having a client but supporting it is proving tricky. |
#5
|
||||
|
||||
Alternatively, the JSON may not actually be the best method to use either. There are some capabilities for storing user database information in the main sagetv database, which would then handle this all for you, and actually caches data on the clients in a smart and high performance way.
http://sagetv.com/api/index.html?sag...RecordAPI.html
__________________
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:
__________________
SageTV v9 Server: ASRock Z97 Extreme4, Intel i7-4790K @ 4.4Ghz, 32GB RAM, 6x 3TB 7200rpm HD, 2x 5TB 7200rpm HD, 2x 6TB 7200rpm HD, 4x 256GB SSD, 4x 500GB SSD, unRAID Pro 6.7.2 (Dual Parity + SSD Cache). Capture: 1x Ceton InfiniTV 4 (ClearQAM), 2x Ceton InfiniTV 6, 1x BM1000-HDMI, 1x BM3500-HDMI. Clients: 1x HD300 (Living Room), 1x HD200 (Master Bedroom). Software: OpenDCT :: WMC Live TV Tuner :: Schedules Direct EPG |
#7
|
|||
|
|||
Thanks for the feedback I don't choose JSON it's what my external service gives me to work with. I originally stored the Jason into custom java objects and used the userrecord API. The problem was the source I am using requires me to update any changes data a min of every 24 hours. Using the api key wasn't very efficient for my use case but I'll give it another look. I am not looking to add to the core api right now outside of my scope for this project maybe after. It would be over 18k objects I'll look at userrecord.
Storng in Json since that is what I receive in and retrieving into custom java objects is extremely fast and efficient and also min in space. I have read many forums about people complaining about their sagedb sizes creeping up and was trying to avoid contributing too that as well. As with all programming more than one way to slice and it's always interesting to get other ideas. Thanks again |
#8
|
|||
|
|||
You could just have the client perform the function itself rather than sharing between the server and clients for this data as long as its not too intensive.
Or use a central folder concept like fanart does. k
__________________
If you wish to see what I am up to and support my efforts visit my Patreon page |
#9
|
|||
|
|||
Ya the central fanart concept may be best I'm going to look at some options this week with userrecord just seems excessive to store that much in there.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
2 clients on the same pc? | Eternal | SageTV Software | 0 | 06-15-2011 08:43 PM |
Multiple clients | tombailey | SageTV Media Extender | 5 | 11-13-2007 11:18 PM |
How to log off clients | mattbrad2 | SageTV Software | 4 | 12-22-2006 11:23 AM |
Clients lock up on 2.1 | SPHurley | SageTV Software | 3 | 11-08-2004 07:57 AM |
Number of Clients | Robert Howard | General Discussion | 8 | 10-10-2003 07:56 PM |