Official eMule-Board: Using Sqlite3 For Keeping Easier Track Of All User Data And Configurat - Official eMule-Board

Jump to content


Page 1 of 1

Using Sqlite3 For Keeping Easier Track Of All User Data And Configurat

#1 User is offline   126 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 13
  • Joined: 25-September 10

Posted 28 October 2017 - 07:05 PM

I've been thinking that adding SQLite3 to eMule to keep track of all user data into a database would be a great improvement and simplification to the eMule codebase.

SQLite3 is easy to integrate and use even for a beginner C programmer, and it's public domain, so it could really provide a much simpler and portable access to all user data. It also supports UTF-8 and UTF-16, so it would really be ideal and would probably reduce the code footprint.

An SQLite3 database only allows 1 instance of a program running simultaneously for writes, but measures can be taken for concurrent writes, like locking and timing out from instance threads of a same program. It can also enable journaling so it would be safer in case of frequent crashes.

Due to the fact that eMule is always running, it is very prone to losing data. For example, if eMule isn't closed normally, all performed searches are lost, but if SQLite3 was used, that data would be stored in the user database and it would be available for the next time eMule is used, instead of completely losing that data due to a sudden close. So it would be a solid improvement for eMule, and given that we are at version 0.50b BETA1, it would probably be possible to add SQLite3 for adding those improvements.

The easiest SQLite3 source code format to just #include <sqlite3.h> and is ready to use, is SQLite Amalgamation.

sqlite3 visual studio 2008

This post has been edited by 126: 28 October 2017 - 07:10 PM

1

#2 User is offline   fox88 

  • Golden eMule
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 4974
  • Joined: 13-May 07

Posted 29 October 2017 - 05:38 PM

An old topic: https://forum.emule-...howtopic=148749
0

#3 User is offline   126 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 13
  • Joined: 25-September 10

Posted 30 October 2017 - 09:13 PM

It's not for downladed MET files, it's to store search tabs and data mostly because as eMule currently is, if you terminate the emule.exe process, you can see that all tabs you searched for in this session along with the actual search terms will be lost, but that wouldn't happen if SQLite3 stored those searches as soon as they are performed, so the program would be more robust by not losing the search tabs suddenly.
0

#4 User is offline   fox88 

  • Golden eMule
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 4974
  • Joined: 13-May 07

Posted 30 October 2017 - 09:48 PM

View Post126, on 31 October 2017 - 12:13 AM, said:

the program would be more robust by not losing the search tabs suddenly.

That level of robustness could be easily achieved by writing data immediately after reception, not only on exit as it is now.
0

  • Member Options

Page 1 of 1

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users