Synchronizing bookmarks - Request for comments

Côme Chilliet come at chilliet.eu
Wed Dec 16 18:26:27 GMT 2020


Le mercredi 16 décembre 2020, 07:57:49 CET skyjake a écrit :
> I think this is a valid use case, and it's something I have been thinking about myself just running Lagrange on a number of different computers. When you bring in a mix of different clients and desktop/mobile operating systems, sync is even more important.
> 
> The lowest common denominator should be export to/import from a .gmi file. Such a file (that Adnan Maolood suggested, for example) is guaranteed to be at least viewable by all clients. It supports folders, has no line length limitations, and can support tags as well (e.g., an optional line/bullet/quote following a link).  The user can then manually manage the files via any means they see fit.

I did not put folders and tag in the specification to start with something as simple as possible, but it could of course be added, to the gmi format at least.

> However, the UX of doing that on an ongoing basis to sync your bookmarks/feeds isn't great. An automated mechanism is certainly more desirable.
> 
> When it comes to basing sync on the Gemini protocol, it makes a certain amount of sense (clients know how to do Gemini requests) but it's not a perfect fit:
> 
> * one add/del per request — what if you have a 100 bookmarks to sync?

This seems like an uncommon case, most likely you will sync 100 bookmarks from server to client, not the other way. It does not bother me if the initialization of the system is a bit under-optimized if after this it’s okay for everyday use.

> * request URL length limit

Yeah that may be a problem, especially if we start adding tags and such. It’s not clear how big a limit that would be.

> * does not address tags, folders, manual ordering

I did not think of ordering, indeed it may be needed.

> > * Would you consider implementing support for something like this?
> 
> Something like this, yes.
> 
> The current proposal needs revising, though. I suggest creating a mechanism that allows using Gemini subscriptions as a core part of the sync. A client would view and/or subscribe to a bookmarks page served by the bookmark sync server. Client-side, the subscription would track all links instead of dated links, and ensure that all links on the bookmarks page have copies in the local set of bookmarks. (And somehow get rid of deleted bookmarks, too.)
> 
> This way,  a public bookmarks feed could be served as a static file by any Gemini server.

This is intended by the spec and is why the only MUST is the text/gemini link list.

> It's a good idea that a client cert is used to ensure privacy of the served bookmarks, unless they are meant to be public.
> 
> The upload part is where it's gets tricky, and I don't think the Gemini protocol should be used for that. As a client author what I'd like to see is that I just export the bookmarks .gmi file as usual, and then send it to the server, perhaps via a TLS socket at a port specifically reserved for uploads — just open a socket, set a client cert, and write the .gmi file to the socket. The client cert would be required for user identification. It would be up to the server to merge the bookmarks and get rid of deleted ones on server-side.
> 
> This does make things a bit more difficult for the server implementation, but keeping things easy for clients at least encourages wider support.

I thought it was easier for clients if they can reuse their Gemini handling code instead of adding support for another protocol. Same thing for server actually.

> > * Does your client have some kind of plugin system which would allow a third-party to add support?
> 
> Not currently. However, Lagrange's MIME hooks could be extended to allow manual activation, so you could run an external program on your "about:bookmarks" page to do the sync. It would need to edit the internal bookmarks.txt file, and Lagrange would then need to detect that the file has changed after the hook program finishes. I wouldn't prefer going down this route, though. It's better to have a mechanism that benefits all clients equally.
> 
> So let's keep working on this! Automatic bookmark (and client cert?) sync would be great features for Gemini clients.

If I’m not mistaking, lagrange has no support for folders, ordering and tagging bookmarks/feeds?
This is also why I did not put such things in the spec, to start with the minimal common denominator among clients features.

Côme




More information about the Gemini mailing list