Author Topic: bookmarks synchronizer?  (Read 9092 times)

Offline Eric H. Jung

  • grimholtz
  • Administrator
  • *****
  • Posts: 3353
bookmarks synchronizer?
« on: October 02, 2005, 04:40:13 AM »
Hi everyone,

I'm currently looking at the source code of Bookmarks Synchronizer to see how the author performs upload/download/merging of bookmarks. I'm learning to do this so PasswordMaker can upload/download/merge its account information.

Since I haven't even used Bookmarks Synchronizer to know how well it works, which bookmarks uploader/downloader do you use, if not this one? Do you know of another extension which performs upload/download and/or synchronization of anything? The extension does not have to be listed on UMO (addons.mozilla.org).

Thanks,
Eric
« Last Edit: October 02, 2005, 04:40:56 AM by Eric H. Jung »

Offline quixin

  • Hero Member
  • *****
  • Posts: 538
bookmarks synchronizer?
« Reply #1 on: October 02, 2005, 03:15:36 PM »
The InfoLister has FTP up/down.



Offline tanstaafl

  • God Member
  • ******
  • Posts: 1363
bookmarks synchronizer?
« Reply #2 on: October 02, 2005, 08:42:37 PM »
I still think you should start out with simple file backup/restore type synch - in other words, don't try to *merge* the differences between two or more files, just replace one with another. Let the user make sure that any changes they make during a session get uploaded to the PM site successfully (although PM should be capable of doing this automatically) - maybe some kind of success/fail pop-up would suffice?

This keeps the Users PM Online Settings up to date, and then the next time they run FireFox (from the same or a different computer), PM checks for a newer version of the RDF file.

Then, once you have the UI and basic secure FTP code working, *then* think about implementing merging of changes. Or maybe the difference isn't as complex as I'm thinking?

Offline tanstaafl

  • God Member
  • ******
  • Posts: 1363
bookmarks synchronizer?
« Reply #3 on: October 02, 2005, 08:54:43 PM »
Sorry -meant to mention - I have only used Bookmarks Synchronizer, and it works pretty good, but not perfectly - had one case of a corrupted file on the target after a synch, and had errors after that until I deleted the corrupted file. So, MD% checksumming before/after would be a necessity.

Offline Eric H. Jung

  • grimholtz
  • Administrator
  • *****
  • Posts: 3353
bookmarks synchronizer?
« Reply #4 on: October 02, 2005, 10:55:19 PM »
Quote
I still think you should start out with simple file backup/restore type synch - in other words, don't try to *merge* the differences between two or more files, just replace one with another
That's precisely what I'm planning.

Quote
although PM should be capable of doing this automatically
First implementation might force the user to manually do the upload/download.

Quote
This keeps the Users PM Online Settings up to date, and then the next time they run FireFox (from the same or a different computer), PM checks for a newer version of the RDF file.
Again, might not be first implemetation--second could do that--and third could do merging.

Code: [Select]
So, MD% checksumming before/after would be a necessity.Excellent suggestion. I hadn't thought of that but will make sure it's there.

Offline tanstaafl

  • God Member
  • ******
  • Posts: 1363
bookmarks synchronizer?
« Reply #5 on: October 03, 2005, 02:26:41 AM »
I agree with the stages you outlined - manual first, then automatic, then merging. Also, initially, you'll only be working with two copies - the one on the local machine, and the one on the Server. At some point, though, I'd like to see the ability to define multiple Sync Sites, which means multiple files. Maybe this would be a good time to introduce the concept of 'Profiles', a'la Firefox Profiles. An RDF file could be password protected itself, so there could be 'Joe's Settings' and 'Mary's Settings', and you could only use the Settings for which you knoew the password.

Complexity, complexity...

I know it is hard to keep up with all of these suggestions... but I have mentioned the MD5 shecksums more than once - here's from one of my earlier posts on this topic:

Quote
The problem of having inconsistencies should be addressable by using date/time stamps, MD5 checksums, and a synch-session-status file of some sort on the Primary Synch Server. Describing the desired behavior is the easy part - the hard part will be Eric's job - the actual coding. ;)

The 'Sync'Session Status' file I described provide a framework for keeping track of changes in RDF files on theLocal Workstations and the Remote Server(s) in the following manner:

1. The Primary Sync/Session file on the Server would keep up with whether or not a Sync Session (when a new Browser Session Starts (checks for an updated RDF file), and when it stops (uploads a changed RDF file, if the current one in use is newer than the one on the Server).

2. The Local copy of PM would also keep one of these files.

Now, how to work out the logic for each, to best figure out which copy is the most up to date, or what to do when a Sync Session fails or never completes, like, for example,someone leaves a Browser Session running on his home computer and then logs into his computer at work, thus resulting in possible changes he may have made at home not being present in the current file on the Sync/Server? I don't know. Maybe PM could then allow for a 'Syncless' Session (a session that would not result in changes to the RDF file being saved back up to the server), or some maybe give the User the option of calling his wife at home and getting her to close the Browser Session, let it update, and then continue Syncing.

Man, this will be a programming nightmare... I wish I could help, Eric... :(

Offline trephin

  • Jr. Member
  • **
  • Posts: 38
bookmarks synchronizer?
« Reply #6 on: October 03, 2005, 12:04:37 PM »
Was there some problem with using MD5 for checksums?  I think GnuPG stopped using them for some reason.  I don't use GnuPG so i'm not up to date on that.

on a side note, I know there is a convenient browser extension for checksums but it's not available for mozilla suite

Offline tanstaafl

  • God Member
  • ******
  • Posts: 1363
bookmarks synchronizer?
« Reply #7 on: October 03, 2005, 01:04:49 PM »
Quote
Was there some problem with using MD5 for checksums? I think GnuPG stopped using them for some reason. I don't use GnuPG so i'm not up to date on that.
Could be... but not that I've heard of. Even if there were, there should be some other algorithm that could be used by PM.

Quote
on a side note, I know there is a convenient browser extension for checksums but it's not available for mozilla suite
Yeah - MD5Sum - been using it for a while, and it works great.

Offline Eric H. Jung

  • grimholtz
  • Administrator
  • *****
  • Posts: 3353
bookmarks synchronizer?
« Reply #8 on: October 03, 2005, 02:38:37 PM »
Quote
Was there some problem with using MD5 for checksums?
There is a slight chance of collisions with MD5, albeit very remote. This means two or more files could actually produce the same MD5 hash even though they are different. SHA-1 seems to be the new de facto standard.

Offline tanstaafl

  • God Member
  • ******
  • Posts: 1363
bookmarks synchronizer?
« Reply #9 on: October 03, 2005, 02:53:28 PM »
Quote
Quote
Was there some problem with using MD5 for checksums?
There is a slight chance of collisions with MD5, albeit very remote. This means two or more files could actually produce the same MD5 hash even though they are different. SHA-1 seems to be the new de facto standard.
Which the MDHash Tool (not MD5Sum, as I previously erroneously referred to it) supports also.

Offline Eric H. Jung

  • grimholtz
  • Administrator
  • *****
  • Posts: 3353
bookmarks synchronizer?
« Reply #10 on: October 03, 2005, 03:05:51 PM »
So does PasswordMaker. Look in the list the hash algorithms :) The code for generating MD5 and SHA1 hashes is already in the extension you've got instaleld right now.

Offline Romeo

  • Hero Member
  • *****
  • Posts: 561
bookmarks synchronizer?
« Reply #11 on: October 03, 2005, 03:16:22 PM »
So, from what I've been reading in this topic, it seems that SHA-1 is better that MD5.  It would   What about HMAC-MD5?  Does that make it any better for my generated passwords?
It is impossible to create a fool-proof system, because fools are ingenious.

Offline tanstaafl

  • God Member
  • ******
  • Posts: 1363
bookmarks synchronizer?
« Reply #12 on: October 03, 2005, 03:25:06 PM »
Quote
So does PasswordMaker. Look in the list the hash algorithms smile.gif The code for generating MD5 and SHA1 hashes is already in the extension you've got instaleld right now.
Oh... I knew that, - :) - but we were talking about something different.

The MDHash Tool is an extension that lets one easily verify the MD5/SHA1 Sum of a file that you donwloaded - or is there a way to do that with PM that I overlooked?

PasswordMaker Forums

bookmarks synchronizer?
« Reply #12 on: October 03, 2005, 03:25:06 PM »