SQLite for servers
#1

Hi, I've hit a classic decision making moment and I figure it's worth asking those who may have used SQLite for their servers.

Actually, it's kind of different, as I'm using the SAMPGDK to work on my game mode in C++ and am using sqlite3 and don't even know if SA-MP uses the latest version, as there's no info on it anywhere it seems.

I'd like to know how many have used SQLite and how it manages specifically with an SA-MP server. I actually feel, somehow, that using SQLite would be a great choice, especially in my scenario. I know it's known for slower insertions and faster look-ups than MySQL - besides other technical benefits. But when it comes to this, especially since I probably won't be actually having to manage anything and won't be setting up my own server full-time and instead will probably give it to someone I feel can manage it, I could do with the opinion of those who have had to use both.


It's likely I'll just use SQLite for a majority of things and may consider using MySQL for things like player accounts and anything else that might also be useful to access from a web server, but I basically just object to using the MySQL API due to the license
Reply
#2

What do you mean "how it manages specifically with a SA-MP server?" The SQLite functions are wrapped so you can use them within Pawn, similar to other natives (i.e. file reading/writing functions).

I believe SA-MP uses SQLite 3, but I don't know that for fact, it's not written down anywhere.

As for how many people use it, I have no idea, I presume not too many. One of SA-MP's hugest servers used to use it, I believe it was called Ultimate Stuntage (or something along those lines) so I believe that quashes any concerns (for me at least) about stability with a large amount of queries.
Reply
#3

Quote:
Originally Posted by Calgon
Посмотреть сообщение
What do you mean "how it manages specifically with a SA-MP server?" The SQLite functions are wrapped so you can use them within Pawn, similar to other natives (i.e. file reading/writing functions).
I'm not talking about using them with Pawn. I'm using SQLite3 myself in C++. Though I wanted to ask people who have used SQLite with SA-MP where they feel its strengths and weaknesses are.

Quote:

I believe SA-MP uses SQLite 3, but I don't know that for fact, it's not written down anywhere.

As for how many people use it, I have no idea, I presume not too many. One of SA-MP's hugest servers used to use it, I believe it was called Ultimate Stuntage (or something along those lines) so I believe that quashes any concerns (for me at least) about stability with a large amount of queries.

Yeah, I know it's stable. I'm actually more looking for any thoughts against it than anything. It will be much easier for me to give my own wrapper for SQLite, but I could see that using MySQL for, say, a player database could be a better option. Unfortunately that is quite a bit more work and involves a restrictive license.
Reply
#4

Quote:
Originally Posted by Deji
Посмотреть сообщение
I'm not talking about using them with Pawn. I'm using SQLite3 myself in C++. Though I wanted to ask people who have used SQLite with SA-MP where they feel its strengths and weaknesses are.
I think you know pretty much all there is to know about it already. I haven't done any real benchmarks or speed testing, I just know it's pretty reliable in SA-MP and should easily cover a SA-MP server and more after using it on a live server.
Reply
#5

Quote:
Originally Posted by ******
Посмотреть сообщение
If you are using SAMPGDK, you could go through the PAWN natives to the inbuilt SQLite database, but you might be as well off including the latest version directly in to your plugin. I can't see any real downside to doing that, you will have full access to all functions, a more direct and faster connection, and know that it is the version you want.
Going through the PAWN natives would be slower and actually a little harder, heh. Nah, I'm compiling it myself. I pointed out the lack of distinction about SA-MP's SQLite version as I was interested in knowing how valid any opinions on using SQLite would be here. I can easily assume any complaints about the performance of SQLite compared to say, the much popular MySQL, wouldn't apply for me.

I'm not sure about access from a web server either. Obviously it's going to be required on some level eventually. Though if the server is running will it be readable or even flushed until the database is closed? Would it be necessary or even better to have the server sync the local database with the MySQL one periodically? Maybe I'm just over-complicating things in my mind now...

It's perfect in every way to handle most other things I need it for - those that are only going to be accessed by the server. I just need re-assurance that I can avoid MySQL altogether.
Reply
#6

Quote:
Originally Posted by ******
Посмотреть сообщение
I'm not sure if what I said was clear, I was advocating not going through PAWN, which is what you seem to be thinking too.
Yes, I figured you thought I was going through PAWN and I was pointing out that I wouldn't dream of it
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)