Skip to Content
It is currently January 28th, 2022, 12:12 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: November 28th, 2021, 5:56 pm 
Offline
Senior User
Senior User

Joined: September 12th, 2012, 9:42 pm
Posts: 93
Hi. I'm running two instances of SAM on separate servers. This is meant to be back up. I really want to have them synced to play the same thing, just stream to two separate mounting points in case one goes down. is it possible to run them on the same DB? I imgaine this would cause all kind of problems though. Any thoughts?


Top
 Profile  
Reply with quote  
PostPosted: November 28th, 2021, 7:44 pm 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 8299
Location: Cologne (Germany)
Technically it's fine, SAM won't crash if you do that and MySQL/MariaDB is more than capable of handling 2 database connections at the same time.

It will most likely not work to sync your 2 sites, though. The timing is too short for that. SAM only stores the queue, history and libray in the database. Not the current state of the players and it doesn't synchronize it's clock with the database or decide when to pick a new song based on the database time.

What will most likely happen is SAM #1 will pick song #1 from the queue and moments later SAM #2 will pick the next track because the other one is already gone from the queue. (If you keep a queue at all)
Abusing PAL to help is really hard. If you'd make SAM #2 pick the last played track from the history, it would probably work most of the time, but after a few days the time difference will likely drift in favor of either #2 staying too long behind (i.e. it would skip liners and other short tracks if it finishes the last track later by more than the shortest liner/ID/track in your library - i.e. 10 seconds after #1 when your liner is only 5 seconds)

All in All it's probably not worth the effort. If you want to decentralize your station, invest in separate streaming servers instead and supply the streaming servers with a bunch of fallback tracks to use when no encoder is connected.

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

Shop for readymade PAL scripts by countrywesterndj - Or get a custom script made by me (or others)

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group