Pedia Server
Posted: Sun Nov 07, 2010 3:08 pm
Hi,
Like many other people, I own two Mac and my Pedias are installed on both. Thus, I have many synchronization problems, to keep both machines up-to-date, because I want to be able to add (or remove) items either on my laptop or on my desktop.
The first step to solve this problem was to writing a Python script to synchronize databases, but it requires to directly read databases, which are stored as a file, and pictures.
So, why not creating a PediaServer, to which a Pedia (and maybe PocketPedia ) will connect through internet to synchronize data? It could be a great companion for all Pedias.
This is possible and not so hard to do. In fact, I have “created” my own server: this is a quite small script to create and fill a MySQL database with the content of the SQLite base of *Pedia and the content of pictures.
Then I wrote a client, which reads the local base and connects to the MySQL server to compare data. Collections are not supported (some informations are missing to perfectly synchronize them), but now, I can add and modify some books on my laptop and remove another book on my desktop before synchronizing them, and everything will correctly updated.
So, I solved my own problem with around 1,000 lines of Python (only with a basic command-line interface), but maybe someone else could be interested? I could post my code.
And it could be great to see such an option integrated directly into the Pedias.
Like many other people, I own two Mac and my Pedias are installed on both. Thus, I have many synchronization problems, to keep both machines up-to-date, because I want to be able to add (or remove) items either on my laptop or on my desktop.
The first step to solve this problem was to writing a Python script to synchronize databases, but it requires to directly read databases, which are stored as a file, and pictures.
So, why not creating a PediaServer, to which a Pedia (and maybe PocketPedia ) will connect through internet to synchronize data? It could be a great companion for all Pedias.
This is possible and not so hard to do. In fact, I have “created” my own server: this is a quite small script to create and fill a MySQL database with the content of the SQLite base of *Pedia and the content of pictures.
Then I wrote a client, which reads the local base and connects to the MySQL server to compare data. Collections are not supported (some informations are missing to perfectly synchronize them), but now, I can add and modify some books on my laptop and remove another book on my desktop before synchronizing them, and everything will correctly updated.
So, I solved my own problem with around 1,000 lines of Python (only with a basic command-line interface), but maybe someone else could be interested? I could post my code.
And it could be great to see such an option integrated directly into the Pedias.