Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   SQLite for Facebook/Mobile Devices (https://forums.graalonline.com/forums/showthread.php?t=134269024)

sssssssssss 01-22-2014 07:34 PM

SQLite for Facebook/Mobile Devices
 
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...03&postcount=3

Depends on what you need to do.

Torankusu 01-23-2014 01:45 PM

Quote:

Originally Posted by sssssssssss (Post 1725379)
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

PHP Code:

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

Quote:

Originally Posted by sssssssssss (Post 1725388)
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).


All times are GMT +2. The time now is 05:03 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.