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

Is Resumption DB used ? #95

Open
AByzhynar opened this issue Jul 20, 2018 · 9 comments
Open

Is Resumption DB used ? #95

AByzhynar opened this issue Jul 20, 2018 · 9 comments
Assignees
Labels

Comments

@AByzhynar
Copy link

AByzhynar commented Jul 20, 2018

At the moment SDL has the following flag in smartdevicelink.ini file : UseDBForResumption
But we never use it.
SDL always uses app_info.dat file (with a simple json structure) for resumption purposes.
Please clarify if we still need to keep this flag as well as SDL functionality related to resumption usage with SQL data base?

@robinmk
Copy link

robinmk commented Jul 20, 2018

@AByzhynar
I believe there is no negative impact on keeping this flag. If that is true, then I would recommend keeping this flag since there is no proposal which talks about removing this flag.
At a later point, the project maintainers can do a clean up and this can be brought up as an item for cleanup.
What do you think?

@AByzhynar
Copy link
Author

@robinmk From this point of view - I agree.
But there is another question : Do we need to implement resumption during Low Voltage for usage with DB? I will be glad to do it, just don't want to make redundant work which can be never used. What do you think?

@robinmk
Copy link

robinmk commented Jul 22, 2018

Do we need to implement resumption during Low Voltage for usage with DB?

I think I may have misunderstood your question, but how else can resumption data be saved without using DB?

@AByzhynar
Copy link
Author

@robinmk At this moment SDL creates app_info.dat file (it is just simple txt file which contains all resumption related data in JSON format). Is is easy and fast to add or read data from this file when it is needed.
But there is another possibility to use resumption : create file resumption.db which is SQL data base, append or remove data with SQL transactions, commit these transactions etc. But I don't remember that this possibility was ever used.
Therefore my question : Do we need to update just resumption during Low Voltage to be used with app_info.dat (txt with JSON format) which is used by default or we have to implement resumption during Low Voltage also for SQL data base way which is not used now?

@robinmk
Copy link

robinmk commented Jul 23, 2018

Do we have an instance in the open where SQL is used? - I guess Policy uses SQL db.

@AByzhynar
Copy link
Author

@robinmk If globally - we used separate thread in SDL which periodically saves Policy DB from RAM to file system.

  • Here we can not avoid it : we have lots of different tables and lots of cross dependencies between them. Therefore we need to use SQL data base in case of Policy
  • In case of resumption there is simple structure which is wrapped into JSON and placed to txt file.

@AStasiuk
Copy link
Contributor

@robinmk, did you have a chance to review Andrey's answers?

@robinmk
Copy link

robinmk commented Jul 25, 2018

Yes, Andrey and I have been discussing over slack.

@AStasiuk
Copy link
Contributor

@robinmk, suggested to put here, in GitHub your decisions. It will be easy for all to track them.

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

No branches or pull requests

5 participants