PDA

View Full Version : SQLite for Facebook/Mobile Devices


sssssssssss
01-22-2014, 07:34 PM
Is there any difference in using SQLite vs DBNPCs for a Facebook or mobile device server in terms of lag and performance? Which is the better option? Does it even make a real difference?

Hezzy002
01-23-2014, 04:09 AM
how are sqlite or dbnpcs even interchangable

sssssssssss
01-23-2014, 04:16 AM
Saving this.vars in a dbnpc vs storing it in sql.

cbk1994
01-23-2014, 05:29 AM
DB NPC flags are typically stored in memory.

sssssssssss
01-23-2014, 11:44 AM
Does that make it worse? Does sql not store in memory? I'm not very knowledgeable with those specifics Chris. But tryin to learn some right now. :/

Torankusu
01-23-2014, 01:36 PM
http://forums.graalonline.com/forums/showpost.php?p=1641003&postcount=3

Depends on what you need to do.

Torankusu
01-23-2014, 01:45 PM
I know it's server-side I didn't realize I said it was client-side you knob...

Saving this.vars in a dbnpc vs storing it in sql. You don't have to be a **** I was just making sure sql was ok to use on mobile and Facebook servers and if there was any real difference in efficiency between the 2. Damn son...


Some things ive decided to use sql for instead of a dbnpc are things like items dbnpc method thread (http://forums.graalonline.com/forums/showthread.php?t=68274)


function onCreated()
{
/*
Format:
this.item_id = {Name, Internalname, Image, ActionWeapon, Canbedropped};
*/

this.item_100 = {"Block", "block", "block.png", "-No Item", 1};
}


Instead of storing items like that, you can create a table with sqlite instead.

There are instances here you will need scripted interactions where dbnpcs are a better option.

Aside from that, my experiences are limited so I can't shed much more light on the subject. Sorry.

sssssssssss
01-23-2014, 02:01 PM
No, you helped a lot. Thank you. I had thought I heard somewhere that you shouldn't use sql for mobile devices or facebook, but apparently that was wrong as well. I'm very acquainted with SQL from PHP, so I'm more used to that route and would prefer it. I appreciate the help. :)

cbk1994
01-24-2014, 02:44 AM
Does that make it worse? Does sql not store in memory? I'm not very knowledgeable with those specifics Chris. But tryin to learn some right now. :/

Since it's all stored in memory you have to be very careful what you store in DBNPC flags, especially if you expect lots of players (otherwise it quickly scales past anything reasonable).