Softvoile support forum

It is currently Thu May 23, 2013 2:18 pm

All times are UTC




Post new topic Reply to topic  [ 14 posts ] 
Author Message
 Post subject: Data bank synchronisation
PostPosted: Tue Jul 12, 2011 2:33 pm 
Offline

Joined: Fri Jan 02, 2009 2:49 am
Posts: 1
How does the "synchronisation" function -- in the Options/Data Bank dialog -- work ? In the field "Path to synchronisation folder", which "folder" does it refer to ? Is it possible to switch between databanks without opening the Options dialog, let's say, from a combination of keyboard keys ? From buttons on the menu bar ? Thank you.


Top
 Profile E-mail  
Reply with quote  
 Post subject: Re: Data bank synchronisation
PostPosted: Wed Jul 13, 2011 4:04 am 
Offline
Site Admin

Joined: Tue Feb 17, 2004 12:49 am
Posts: 587
Hello

Quote:
How does the "synchronisation" function -- in the Options/Data Bank dialog -- work ? In the field "Path to synchronisation folder", which "folder" does it refer to ?

You should specify special shared folder. It can be network shared folder, or Dropbox folder, or other.
Flashnote has 2 commands:
Push -> save current database and copy it to shared folder.
Pop -> copy database from shared folder to Flashpaste data folder replacing current used file, and reopen it.

So, now you can synchronize your notes between 2 or more PCs manually using i.e. Dropbox service.

Quote:
Is it possible to switch between databanks without opening the Options dialog, let's say, from a combination of keyboard keys ? From buttons on the menu bar ?

No, now only it options. But I'll add such feature soon.

_________________
Best regards, Tiushkov Nikolay


Top
 Profile  
Reply with quote  
 Post subject: Re: Data bank synchronisation
PostPosted: Tue Jul 26, 2011 2:31 am 
Offline

Joined: Tue Jul 26, 2011 2:10 am
Posts: 2
If I could make a suggestion, I think the program would still stay fast if you closed the file when it loses focus or is minimized, wait a couple of seconds and then reopen it. And when it has been idle for about 30 minutes, just close and reopen so if the file has been updated it picks the changes. That way, a synchronization through DropBox could be automatic.

I love your software, but the manual sync cause more problems than it solved because I often forget to push the data. When I pull, I lose what I have done! Perhaps an automatic push could work after changes has been made (or lost of focus/minimized) and a periodic pull when idle? It would not be ideal for people that collaborate, but for individuals that use the same DB on multiple locations it would be perfect! Just to be foolproof, you could add a timestamp of last modification in the DB and not save the pulled version if the local one is more recent.


Top
 Profile E-mail  
Reply with quote  
 Post subject: Re: Data bank synchronisation
PostPosted: Wed Jul 27, 2011 2:24 pm 
Offline
Site Admin

Joined: Tue Feb 17, 2004 12:49 am
Posts: 587
Hello

I am not sure that I want to make automatic backup, because I can't write perfect solution that will good works in 90% cases. With manual backup - you have full control on database, with automatic solution we can't guaranty which data now at the shared folder... But I try to investigate how I can improve it. And maybe will do something in future.

_________________
Best regards, Tiushkov Nikolay


Top
 Profile  
Reply with quote  
 Post subject: Re: Data bank synchronisation
PostPosted: Sat Jul 30, 2011 5:42 pm 
Offline

Joined: Tue Jul 26, 2011 2:10 am
Posts: 2
Thank you for the answer! It could be an optional -at your own risk- automatic backup! At the moment, I cannot use FlashNotes at home because I keep forgetting to push it at work where I use it the most. I really LOVE that program, I made a donation and would even be willing to pay again for it!

I just had another idea: Right now I save my .db directly in DropBox so if I remember to close it at work (because the file is locked), when I am home all I have to do is close and open Flashnotes to pick-up the changes. If there was a way to "take ownership" when you access it the first time on another computer that shares one folder across all of them so that the computer that is currently using the .db drops the file lock. I know you want to keep the program fast, and I think this would be the fastest way since there could not be room for mistake.

How I see it could work. You open FlashNote, it says: You are not the owner of this file, would you like to take ownership? It then writes another file in the same folder than the .db named drop.now, all other Flashnotes that have that .db open close it, Et voilĂ , you can now safely make changes to the .db without fearing it will be modified in the meantime or that it's not the last version! All you have to do is insert some small code to regularly check for the existence of drop.now when idle.

What do you think?


Top
 Profile E-mail  
Reply with quote  
 Post subject: Re: Data bank synchronisation
PostPosted: Sun Jul 31, 2011 10:12 am 
Offline
Site Admin

Joined: Tue Feb 17, 2004 12:49 am
Posts: 587
Hello

Next 3-4 weeks I'll busy at other project. Than I'll start work at new version of Flashnote and I'll think how I can to improve the synchronization mechanism.

_________________
Best regards, Tiushkov Nikolay


Top
 Profile  
Reply with quote  
 Post subject: Re: Data bank synchronisation
PostPosted: Wed Jun 27, 2012 1:58 pm 
Offline

Joined: Wed Jun 27, 2012 1:12 pm
Posts: 2
I also find the current push & pull syncing really troublesome sometimes! I keep forgetting to sync, or forget on which pc I editted which note last. :oops:
I actually got so confused, I had to write a script/batch file to compare two exported txt databases and then manually merged them*.

I like the "drop.now" solution but it isn't fool proof. First you have no control over dropbox's sync-ing, so you might take ownership of the file just before dropbox tries to sync from another pc with new updates - thus losing the changes. Plus, polling for the existance of a drop.now file is also open to the same problems as well as its own locking and deleting issues. And what if you're not online?

My suggestion is to merge rather than to exclusively push or pull. Merging would:
1. Pull the current dropbox DB
2. Merge it with the local DB
3. push the merged DB back to the dropbox folder (if there was any changes)

Further more, instead of automatic or scheduled pushing/pulling/merging, I propose the following:
If a dropbox folder is configured in the options dialog, a sync "toolbar" would appear in flashnote's menubar with a sync status light.
When you open flashnote, it quickly compares the file date & time of the local DB with the dropbox copy.
If the:
- dates are the same, it shows a green light
- local DB is newer, it shows a orange light and suggests a merge or push (this could be a button on the menubar that gets enabled/highlighted)
- dropbox DB is newer it shows a red light and suggests a merge or pull

This status light should be quick to implement and maybe Softvoile can do this as a first iteration, before merging : :mrgreen:
It would be a big help to remember to sync before leaving the PC .

----------------------------------------------------------------
*PS. I only found this compare utility after I wrote my txt files compare script. [http://www.codeproject.com/Articles/220018/SQLite-Compare-Utility] It compares two SQLite DBs (which is what Flashnote use natively), and can be used to manually merge two DB's as well. You have to be careful not to overwrite different entries, so make your backups beforehand!


Top
 Profile E-mail  
Reply with quote  
 Post subject: Re: Data bank synchronisation
PostPosted: Fri Jun 29, 2012 12:42 pm 
Offline
Site Admin

Joined: Tue Feb 17, 2004 12:49 am
Posts: 587
You write absolutely right ideas about how it should be done. But you want a lot from small free utility and single developer:(
Maybe I'll try to improve synchronization, I have some ideas just now, but I can promise nothing...

_________________
Best regards, Tiushkov Nikolay


Top
 Profile  
Reply with quote  
 Post subject: Re: Data bank synchronisation
PostPosted: Wed Jul 04, 2012 3:51 pm 
Offline

Joined: Wed Jun 27, 2012 1:12 pm
Posts: 2
softvoile wrote:
You write absolutely right ideas about how it should be done. But you want a lot from small free utility and single developer:(
Maybe I'll try to improve synchronization, I have some ideas just now, but I can promise nothing...


One can only ask :)

The status light/menu should be quick. I do feel a little bad for suggesting the merging :) Merging two DB's could get tricky, especially because the row ID number will no longer be unique. I can offer some help in thinking up the merging algorithm and have some ideas... e.g. like deriving a new uniqiue ID based on CREATED date and a new RANDOM number field. That way you can easily say which notes are originally the same note in the two DB's regardless of whether the notes were renamed or deleted or added simultaneously. In practice the CREATED date should actually be sufficient as unique ID as its impossible to create two notes in the same DB at once, and highly unlikely to create two notes seperately in two seperate DB's with the same CREATED date.


Top
 Profile E-mail  
Reply with quote  
 Post subject: Re: Data bank synchronisation
PostPosted: Fri Jul 06, 2012 8:20 am 
Offline
Site Admin

Joined: Tue Feb 17, 2004 12:49 am
Posts: 587
Problem is 100% automatic merging with 100% correct result without interaction with user is fantastic from my point of view. Write good interface for manually merging is not easy task, I think it will take half of time that needed to write whole Flashnote:) I am not ready to do this.
I can write synchronization via text file - import\export whole database into txt file with some service information, in this case you can you for example WinMerge for merging. But how many people will want to download, install and main learn WinMerge?

_________________
Best regards, Tiushkov Nikolay


Top
 Profile  
Reply with quote  
 Post subject: Re: Data bank synchronisation
PostPosted: Tue Nov 27, 2012 8:19 am 
Offline

Joined: Thu Jun 07, 2007 12:22 am
Posts: 54
I have latest fn, and I am not finding Push and Pop commands, menu options or toolbar icons related to sync anywhere. How to operate that sync?

I have set a new empty folder for syncing. I want fn to save its data to that folder. That is not happening.

Thanks.
--
Rawat


Top
 Profile E-mail  
Reply with quote  
 Post subject: Re: Data bank synchronisation
PostPosted: Tue Nov 27, 2012 8:42 am 
Offline
Site Admin

Joined: Tue Feb 17, 2004 12:49 am
Posts: 587
File -> Database -> Synchronize

_________________
Best regards, Tiushkov Nikolay


Top
 Profile  
Reply with quote  
 Post subject: Re: Data bank synchronisation
PostPosted: Tue Nov 27, 2012 9:25 am 
Offline

Joined: Thu Jun 07, 2007 12:22 am
Posts: 54
ok. found that. and used that.

it is sort of creating a copy of notes2.db in sync folder.

how different that would be from backing up and restoring back of database?

Thanks.
--
Rawat


Top
 Profile E-mail  
Reply with quote  
 Post subject: Re: Data bank synchronisation
PostPosted: Wed Nov 28, 2012 4:48 pm 
Offline
Site Admin

Joined: Tue Feb 17, 2004 12:49 am
Posts: 587
there are no dig diferences. Just synchronization designed for other easy sycn database beettwin two PCs.

_________________
Best regards, Tiushkov Nikolay


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You can post new topics in this forum
You can 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group