smartdevicelink / sdl_requirements

Collection of requirements/technical tasks for new sdl_core features
BSD 3-Clause "New" or "Revised" License
2 stars 7 forks source link

Is Resumption DB used ? #95

Open AByzhynar opened 6 years ago

AByzhynar commented 6 years ago

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 commented 6 years ago

@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 commented 6 years ago

@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 commented 6 years ago

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 commented 6 years ago

@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 commented 6 years ago

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

AByzhynar commented 6 years ago

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

AStasiuk commented 6 years ago

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

robinmk commented 6 years ago

Yes, Andrey and I have been discussing over slack.

AStasiuk commented 6 years ago

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