RESTer icon indicating copy to clipboard operation
RESTer copied to clipboard

Sync requests/settings/environments

Open gigaSproule opened this issue 7 years ago • 5 comments

Loving the add-on, which is a great replacement for Postman (trying to avoid Chrome like the plague). The only feature I'm missing is the ability to sync my setup between devices. Is it possible to add it in? I've found this page on doing it via Firefox Sync, but not sure how easy it would be. I'd be happy to give it a go myself, but not sure if I'll be able to.

I understand you're going to busy with other things, so I understand if it's not a high priority and won't get done unless someone else does it.

gigaSproule avatar Apr 04 '18 16:04 gigaSproule

Sync is one of the things I would really like to support. I just haven't figured out how to do this properly, yet. Here are the solutions I thought about:

  • storage.sync
    • Good: Will just work for users. No additional setup required. Easy to implement.
    • Bad: Limited to 100KB, which is most likely not enough to store all requests.
  • Custom sync server, which I already started working on for a bit (https://github.com/frigus02/RESTer-Server). I paused my work on it, because I wasn't sure if it's the right way.
    • Good: No data constraints. Can implement conflict resolution. Could implement sharing of data between teams.
    • Bad: Who pays for the hosting? Users need to create an account for this. Lots of work to implement.
  • Sync with online storage like Dropbox or Google Drive:
    • Good: No data/privacy/cost constraints. In theory users could sync storage from someone else to share data in team.
    • Bad: How to do conflict resolution? Need to ideally support a range of providers, which is lots of work implement and also to maintain.

I think storage.sync does not work because of the size limitation. I like Dropbox/GDrive/etc. because everyone will pay for their own storage. But I think it could be difficult to do proper conflict resolution and I am afraid of the maintenance effort.

What are your opinions on these? Do you have any other ideas? Help is welcome 🙂

frigus02 avatar Apr 04 '18 19:04 frigus02

100 kb is quite a lot. I mean, all that's being stored are strings, right? I assume you you could easily compress it as well (perhaps with pieroxy/lz-string). If a user were to reach that high data storage, then I would simply show a popup message the next time they try to save anything too large informing them that syncing will not function.

No one expects you or anyone else to run their own sync server for this, that's totally overkill. But let's not limit the functionality to the vast majority of users who only save a handful of requests, not the thousands that would be necessary to fill up 100k!

hackel avatar Aug 03 '18 01:08 hackel

First of all, sorry for not replying, I've been too busy to do anything as of late.

As for which solution I'd like, most if not all cloud storage services will just create a conflict file if they're conflicted, so why not do the same? Another approach would be to always read from Dropbox, GDrive, OneDrive, at startup and just before making changes and maybe on a schedule? If you find a conflict, simply prepend the display name of the request your trying to change with conflict and add it as a new request, therefore leaving the user to resolve. That way, you don't need anything complicated, just a simple comparator that returns true or false and you don't need to host it yourself.

Remember that most people will be using it in a professional context as a postman alternative, so will probably have loads of requests, breaking the 100k limit. But for the hobbyists or people who are happy with the limitation to not have another thing connecting to their private cloud service, maybe have a toggle to use storage.sync?

gigaSproule avatar Aug 03 '18 06:08 gigaSproule

I had a couple of reports indicating people have more than 100 kB of data. So I don't think storage.sync is a good option.

I agree with the could providers and the simple conflict mechanism. I'm just a bit hesitant because I fear that managing sync for a few cloud providers could be a lot of work. But that might still be the best option. Can't say if I get to this anytime soon, unfortunately.

frigus02 avatar Sep 24 '18 10:09 frigus02

perhaps to store them to github repo | gist

yus-ham avatar May 16 '20 22:05 yus-ham