home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Talk
Sync databases by Media Sync Service
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Anthony Vaughan" data-source="post: 1267187" data-attributes="member: 153283"><p>I just want to be clear about what I have been saying about synchronizing the SQLite databases in MediaPortal1.</p><p></p><p>The easy way to synchronize client databases across more than one client is to use file watchers on the client folders to detect changes to the database last write time and to copy the changed databases to all of the other client folders. This would be fine if MediaPortal1 didn't lock the databases - you could simply code for any databases changed to be passed forward to all clients. This would be simple, easy and quick to code, and will work, so long as you never run more than one client at the same time.</p><p></p><p>However, MediaPortal1 locks the VideoDatabaseV5.db3 database for example, once it has been invoked, throughout the entire client session. The effect of this is that, when two or more clients are accessing MediaPortal at the same time, lets call them Client1 and Client2, Client1's changes will be locked when Client2 closes thus preventing Client2's changes being copied to Client1 (because Client1s files are locked). When Client1 closes, its changes will then overwrite the Client2 databases effecting losing all of the changes recently made by Client2. </p><p></p><p>My solution to this was to copy all changes made by Client1 and Client 2 to a separate (Sync) database and to copy the changes in the Sync database back to the client databases when the client session closes. If a client is open when another client closes, the changed database files are copied to a queue folder instead of directly to the clients and updates all client databases as soon as no clients are running (i.e. when there are no locks). This solution involves a lot of coding. I've been running my solution for at least a year and a half and it works pretty well. This solution is truly multi-user compliant.</p><p></p><p>If there is a better, and easier, way to overcome this multi-user issue then I'm all ears.</p><p></p><p>In the meantime, I am going to start using Fanart and intend to extend the databases I will cover in my app from just VideoDatabaseV5 to include FolderDatabase3 and FanartHandler.</p><p></p><p>I am happy to use this system just for myself, but I thought I would be friendly and offer it to anyone else who might be interested. I don't need anyone to be a tester. But this will not be a perfect solution for everyone, so please understand that. I will only offer what I am personally interested in using and developing.</p><p></p><p>Tony</p></blockquote><p></p>
[QUOTE="Anthony Vaughan, post: 1267187, member: 153283"] I just want to be clear about what I have been saying about synchronizing the SQLite databases in MediaPortal1. The easy way to synchronize client databases across more than one client is to use file watchers on the client folders to detect changes to the database last write time and to copy the changed databases to all of the other client folders. This would be fine if MediaPortal1 didn't lock the databases - you could simply code for any databases changed to be passed forward to all clients. This would be simple, easy and quick to code, and will work, so long as you never run more than one client at the same time. However, MediaPortal1 locks the VideoDatabaseV5.db3 database for example, once it has been invoked, throughout the entire client session. The effect of this is that, when two or more clients are accessing MediaPortal at the same time, lets call them Client1 and Client2, Client1's changes will be locked when Client2 closes thus preventing Client2's changes being copied to Client1 (because Client1s files are locked). When Client1 closes, its changes will then overwrite the Client2 databases effecting losing all of the changes recently made by Client2. My solution to this was to copy all changes made by Client1 and Client 2 to a separate (Sync) database and to copy the changes in the Sync database back to the client databases when the client session closes. If a client is open when another client closes, the changed database files are copied to a queue folder instead of directly to the clients and updates all client databases as soon as no clients are running (i.e. when there are no locks). This solution involves a lot of coding. I've been running my solution for at least a year and a half and it works pretty well. This solution is truly multi-user compliant. If there is a better, and easier, way to overcome this multi-user issue then I'm all ears. In the meantime, I am going to start using Fanart and intend to extend the databases I will cover in my app from just VideoDatabaseV5 to include FolderDatabase3 and FanartHandler. I am happy to use this system just for myself, but I thought I would be friendly and offer it to anyone else who might be interested. I don't need anyone to be a tester. But this will not be a perfect solution for everyone, so please understand that. I will only offer what I am personally interested in using and developing. Tony [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Talk
Sync databases by Media Sync Service
Contact us
RSS
Top
Bottom