Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

Support a shared config file for syncing #1391

Closed
vrillusions opened this issue May 17, 2015 · 0 comments
Closed

Support a shared config file for syncing #1391

vrillusions opened this issue May 17, 2015 · 0 comments

Comments

@vrillusions
Copy link

This relates to #617 #126 but both of those refer more to specific browsers. This is a more broadly scoped feature request.

Support setting a custom location to store the config and support that config being access by multiple invocations of ublock (ie, safe for concurrent access) "How Hard Can It Be?:tm:"

The goal of this is to make it possible to set the location of the config file to a folder in dropbox, or on a windows share, or NFS, or whatever other syncing service the user chooses. All browsers on all computers would point to that file and it would keep all browsers in sync.

An alternative option is to have a file that ublock reads at startup to load it's settings and writes to (in a concurrent safe manner) when closing, periodically, etc. The downside is if you make changes in one browser you'd have to restart others for it to be read but I don't really change rules often once I set them. This also may be the only way since I think some services only do the sync when it detects the file is no longer being accessed.

As for how this could be done the only thing I've messed with that can handle concurrency is sqlite. It can handle simultaneous reads but a write locks the entire db file while the write is in process. I've taken advantage of that for some really crude message queuing where one process is updating the database and another is reading (yes, it's hacky, but it works for what I needed it for).

As a developer myself (though not much with browser extensions) I'm aware that this is kind of a big task to get right but it would fix all the smaller issues of "Sync with (dropbox|syncthing|smb|ftp|whatever else)" requests. Now it may also be as simple as allowing the user to specify where the config file is saved and it can already handle things like deadlock and concurrent writes and all that fun stuff.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants