Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to handle settings efficiently? #45

Closed
SkyzohKey opened this issue Feb 9, 2016 · 5 comments
Closed

How to handle settings efficiently? #45

SkyzohKey opened this issue Feb 9, 2016 · 5 comments

Comments

@SkyzohKey
Copy link
Member

SkyzohKey commented Feb 9, 2016

So, it would be nice to have a way to get/set settings in Ricin, I think using a database would be over-head for this. I searched a way to do it properly and had an idea that was also proposed at irungentoo/toxcore#1487.

Problem to solve:

An user should be able to switch to another computer only by saving it's profile file and then download Ricin and import this profile file. The issue here is that if the user only copy it's profile, he'll loose the settings from the first computer.

Potential solution:

A .txz, sort of tar.gz-like. It would contains the following files:

- example.txz
  |- example.tox   // This is the user .tox file.
  |- settings.json // Here we would store settings as json.
  |- aliases.json // The friend's profiles.
  |- Any other standardized datafile...

All of what the client should do is to extract the file in memory and get the file at the inside, then update them and rezip the file.

Note:

Ricin must provide a button to export the user .tox file to a conventional format. It just need to extract the user profile from the .txz archive to the extract path.

References:

irungentoo/toxcore#1487 (comment)

@dunielpls
Copy link

Perhaps SQLite and/or some JSON/YAML file. I see no reason to do it using .txz over, for example, just using a .tox file (or something else) like µTox/qTox and others do.

@SkyzohKey
Copy link
Member Author

Ricin uses Libconfig since #54 get merged, this issue can be closed, so.

@SkyzohKey SkyzohKey reopened this May 30, 2016
@SkyzohKey
Copy link
Member Author

Reopened and updated the issue.

@mkody
Copy link

mkody commented May 30, 2016

I like the idea of an archive. And 👍 for json, it's nice to keep things "human-friendly".

Does that mean that the example.txz is constantly updated or only when we click an export button or exit the client?
Using dropbox/owncloud for syncing could be interesting with this, but if I start running two instances of Ricin (because I'm booting my laptop for example) this could make some conflicts if they're not reading the archive back every time.

@SkyzohKey
Copy link
Member Author

This issue has been inactive for several months now, thus closing.
In the future, feel free to create a new issue instead of keeping posting to this one.

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

No branches or pull requests

3 participants