Jump to content

HiveExt vs Arma2NET vs extDB


Guest

Recommended Posts

Has anyone tried out any of the alternative database connectors?

 

And if so, was there a noticeable performance increase?

 

From what I can gather, HiveExt is the bottleneck in Epoch at the moment, and it might be an idea to convert to something else going forward to 1.0.6 and onwards.

Link to comment
Share on other sites

yup. Almost nothing is done by the hiveext.dll anymore. I use Arma2Net for everything :

- Bring all the objects from the db when the server starts

- Update character and Objects in the database in system_monitor.sqf

- Create vehicles in db from traders

- Use it in tons of custom scripts i wrote (Custom Plotpole information about when you last maintained it, Custom friendlist, Custom coin system....and many other little tweaks)

 

Most of this stuff was done with Arma2Net cause i need to store the playerUID in CharacterID slot like it was before the Steam update. Sure i could create a fake playerUID to fit in the cell but i wanted to do it properly...for when epoch team releases a .dll that has bigint(24) instead of int(11) for characterID.

 

Its not that hard to setup or use. For example....in dayz_server/compiles/server_swapObject.sqf

 

It used to be:

_key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, 0 , _characterID, _worldspace, [], [], 0,_uid];
diag_log ("HIVE: WRITE: "+ str(_key));
_key call server_hiveWrite;

And based on this page here: https://github.com/vbawol/DayZhiveEpoch/blob/13003e840f6ac55cef37bfc26b525a32676aabd2/Hive/Source/HiveLib/DataSource/SqlObjDataSource.cpp

where it says bool SqlObjDataSource::createObject,  we recreate the SQL with arma2net

"Arma2Net.Unmanaged" callExtension format["Arma2NETMySQLCommand ['dayz_epoch','INSERT INTO object_data (ObjectUID, Instance, Classname, CharacterID, Worldspace, Inventory, Hitpoints, Fuel, Damage, Datestamp) VALUES ('%1','%2','%3','%4',''%5'','%6','%7','%8','%9',CURRENT_TIMESTAMP)']",_uid,dayZ_instance,_class,_characterID,_worldspace,_inventory,_array,_fuel,_damage];

only in this case...i use the arma2net dll....which means i can store the big playerUID inside the characterID cell in db.

 

 

I havent tried extDB yet. I am pretty happy with Arma2Net. It has a couple of hiccups now and then....like there are some weird cases where the server wont load it on a scheduled restart, so basically nothing spawns on the map. But that happened twice in 30 days.  240 restarts in a month and 2 fails....thats fine for me :)

 

Overall i'd say go for it. You can get the files from the signature bellow...the 3d.live.mission uses the same files...All you have to do is edit the Databases.txt.

Link to comment
Share on other sites

Ah so you've basically converted from CHILD calls to raw SQL in your server PBOs?

 

Nice :)

 

Any chance you could share your object streaming function?

 

Since A2Net and extDB don't format things the same way (no COUNT returned á la CHILD:302), converting that bit of the code would be the trickiest bit; if you've already done the work and don't mind sharing that'd be awesome :P

Link to comment
Share on other sites

I am doing a whole bunch of stuff in my system_monitor.sqf.

I'll give you the important stuff cause you dont have my custom scripts and it will only confuse you, if i send my whole file.

 

After if (isServer && isNil "sm_done") then {  i have:

    serverVehicleCounter = [];
    _hiveResponse = [];

    for "_i" from 1 to 5 do {
        diag_log "HIVE: trying to get objects";
        _key = format["CHILD:302:%1:", dayZ_instance];
        _hiveResponse = _key call server_hiveReadWrite;  
        if ((((isnil "_hiveResponse") || {(typeName _hiveResponse != "ARRAY")}) || {((typeName (_hiveResponse select 1)) != "SCALAR")})) then {
            if ((_hiveResponse select 1) == "Instance already initialized") then {
                _superkey = profileNamespace getVariable "SUPERKEY";
                _shutdown = format["CHILD:400:%1:", _superkey];
                _res = _shutdown call server_hiveReadWrite;
                diag_log ("HIVE: attempt to kill.. HiveExt response:"+str(_res));
            } else {
                diag_log ("HIVE: connection problem... HiveExt response:"+str(_hiveResponse));
            
            };
            _hiveResponse = ["",0];
        }
        else {
            diag_log ("HIVE: found "+str(_hiveResponse select 1)+" objects" );
            _i = 99; // break
        };
    };
    
    _BuildingQueue = [];
    _objectQueue = [];

so far so good....now we'll ask how many objects are in the db and start "selecting" them

	if ((_hiveResponse select 0) == "ObjectStreamStart") then {
	
		// save superkey
		profileNamespace setVariable ["SUPERKEY",(_hiveResponse select 2)];
		
		_hiveLoaded = true;
	
		diag_log ("HIVE: Commence Object Streaming...");
	
		_key = format["CHILD:302:%1:", dayZ_instance];     // Yes i use the default one here to just get how many objects are in the db (total number)
		_objectCount = _hiveResponse select 1;
		_bQty = 0;
		_vQty = 0;
		for "_i" from 0 to (_objectCount) do {
			if (_i != _objectCount) then {
				_keyvg = format["SELECT `ObjectID`, `ObjectUID`, `Classname`, `CharacterID`, `Worldspace`, `Inventory`, `Hitpoints`, `Fuel`, `Damage` FROM object_data WHERE `Instance`='%1' AND `Classname` IS NOT NULL LIMIT %2,1",dayZ_instance, _i];
				//sleep .001;       // This sleep helped sometimes, when for some reason some objects were skipped....probably cause the .dll isnt that fast ?!?
				_data2 = _keyvg call myserver_hiveReadWriteLarge;
				_response = _data2 select 0 select 0;
				if ((_response select 2) isKindOf "ModularItems" || ((_response select 2) in dayz_allowedObjects)) then {
					_BuildingQueue set [_bQty,_response];
					_bQty = _bQty + 1;
				} else {
					_objectQueue set [_vQty,_response];
					_vQty = _vQty + 1;
				};
			};
			//sleep 0.001;
		};
		diag_log ("HIVE: got " + str(_bQty) + " Epoch Objects and " + str(_vQty) + " Vehicles");
	};

Notice my _keyvg and bellow the call myserver_hiveReadWriteLarge;

its a function that i added in server_functions.sqf...i'll add it at the end of this post.

The above code selects 1 by 1 every object from the object_data table...and check if its modular + if its in the dayz_allowedObjects....cause some buildings are not Modular....so it puts them with the vehicles...Meaning some vehicles might spawn first and then some buildings on top of them....making them fall through on server restart.

 

After then we got:

	// # NOW SPAWN OBJECTS #
	_totalvehicles = 0;
	{
		_idKey = 	_x select 0;
		_vUID = 	_x select 1;
		_type =		_x select 2;
		_ownerID = 	_x select 3;
		
		_worldspace = 	call compile (_x select 4);
		_inventory =	call compile (_x select 5);
		_hitPoints =	call compile (_x select 6);
		_fuel =		call compile (_x select 7);
		_damage = 	call compile (_x select 8);
		

The above call compiles and selections are a bit different from the default ones....this will make sure you grab them correctly, to be used further down with the proper values.

_vUID is basically the ObjectUID....I use it further down with:

_object setVariable ["ObjectUID", _vUID, true];

right after the creation of the 'vehicle'. So its basically:

			_object = createVehicle [_type, _pos, [], 0, "CAN_COLLIDE"];
			_object setVariable ["lastUpdate",time];
			_object setVariable ["ObjectID", _idKey, true];
			_object setVariable ["ObjectUID", _vUID, true];

And thats it....This will stream all the objects from the db.

Now what was that call myserver_hiveReadWriteLarge ?

Open your server_functions.sqf and above server_hiveWrite add this:

myserver_hiveReadWriteLarge = {
    private["_mykey","_qres","_mydata"];
    _mykey = _this;
    _mydata = format["Arma2NETMySQLCommand ['dayz_epoch',""%1""]",_mykey];    //dayz_epoch is your db name (dont forget your db user/pass in Database.txt)
    SQL_RESULT = "Arma2Net.Unmanaged" callExtension _mydata;
    _qres = call compile SQL_RESULT;
    _qres
};

This is the custom hiveReadWriteLarge function.

 

Not that it matters, but i have converted all the rest hive functions as well.

myserver_hiveWrite = {
    private["_mykey","_mydata"];
    _mykey = _this;
    _mydata = format["Arma2NETMySQLCommand ['dayz_epoch',""%1""]",_mykey];
    SQL_RESULT = "Arma2Net.Unmanaged" callExtension _mydata;
};

myserver_hiveRead = {
    private["_mykey","_qres","_mydata"];
    _mykey = _this;
    _mydata = format["Arma2NETMySQLCommand ['dayz_epoch',""%1""]",_mykey];
    SQL_RESULT = "Arma2Net.Unmanaged" callExtension _mydata;
    _qres = call compile format ["%1",SQL_RESULT];
    _qres = _qres select 0;
    _qres
};

myserver_hiveReadWrite = {
    private["_mykey","_qres","_mydata"];
    _mykey = _this;
    _mydata = format["Arma2NETMySQLCommand ['dayz_epoch',""%1""]",_mykey];
    SQL_RESULT = "Arma2Net.Unmanaged" callExtension _mydata;
    _qres = call compile format ["%1",SQL_RESULT];
    _qres
};

myserver_hiveReadWriteLarge = {
    private["_mykey","_qres","_mydata"];
    _mykey = _this;
    _mydata = format["Arma2NETMySQLCommand ['dayz_epoch',""%1""]",_mykey];
    SQL_RESULT = "Arma2Net.Unmanaged" callExtension _mydata;
    _qres = call compile SQL_RESULT;
    _qres
};

So this is one way of making a call to the db. We have the _key with the SQL and then call the function to get back results.

The other way is the one i showed on the 1st post, which is this:

"Arma2Net.Unmanaged" callExtension format["Arma2NETMySQLCommand ['dayz_tavi','INSERT INTO object_data (ObjectUID, Instance, Classname, CharacterID, Worldspace, Inventory, Hitpoints, Fuel, Damage, Datestamp) VALUES ('%1','%2','%3','%4',''%5'','%6','%7','%8','%9',CURRENT_TIMESTAMP)']",_uid,dayZ_instance,_class,_characterID,_worldspace,_inventory,_array,_fuel,_damage];

I use this usually to insert or update stuff, when i dont have anything to return.

Link to comment
Share on other sites

I've also been using arma2netsql since before epoch was a dream back in the old dayz vanilla days.  I think it is absolutely awesome and the performance is surprisingly good.

 

One suggestion I'd like to make to people using them is to embrace stored procedures.

 

If you have to write a query in your code, that is bad form.  firstly, it can open you up to SQLI attacks.  We all know how bad hacking gets.  What if a player calls your PVEH with some malicious data like "; drop table player_data --"  this may not be valid syntax but it doesn't matter, if they are clever they can wipe your db, insert whatever they want, or do what they want.

 

This is what happened to Sony, when all their users credit card info got stolen.

 

So my suggestion is to use parameterized queries in the form of stored procedures.

 

so instead of "Update character_data set humanity = 100"

you'd type "Call proc_UpdateCharacterHumanity(100)"

 

The difference is that we have a stored proc that only takes bigint values as its parameter, not strings etc)

the proc would like like this:

 

CREATE PROCEDURE dayz_epoch.proc_UpdateCharacterHumanity(IN p_Humanity BIGINT)
  SQL SECURITY INVOKER
BEGIN
  UPDATE character_data
    set Humanity = p_Humanity;
END
 

 

 

Also it makes it much cleaner to work with.  All of your DB logic is contained within the DB and you can edit it on  the fly and it will take effect in real time.

Link to comment
Share on other sites

Gotcha. Any particular reason why you use CHILD:302 instead of running a COUNT on object_data?

 

If you did that, you could remove the need to use HiveExt entirely :)

Link to comment
Share on other sites

Thats really nice hambeast, didnt think of that before. I guess when you are in the fever of writing something you bypass some security concerns :P

Well my db user cant drop things, only insert and update and the occasional delete...but not drop. Thats another way to go...Make a new db user for your arma2net user, that can only do these 3 things, select, update, delete and nothing more

Link to comment
Share on other sites

Cause that part of code was working fine, lol....but its easy...you can do it with arma2net like this :

_keyvg = format["SELECT COUNT(*) FROM `object_data` WHERE `Instance` = '%1'", dayZ_instance];
_data2 = _keyvg call myserver_hiveReadWriteLarge;
_response = _data2 select 0 select 0;
_count = parseNumber(_response);

now _count has the number of all the objects.

This will bring ALL the objects from the database...the way i like it, cause i ran all the 'cleanup' sqls before the server starts...so all this:

AND `ObjectUID` <> 0 AND `CharacterID` <> 0
AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL "+lexical_cast<string>(_cleanupPlacedDays)+" DAY)
AND ( (`Inventory` IS NULL) OR (`Inventory` = '[]') )

is irrelevant to me :)

Link to comment
Share on other sites

Right, I've hit a bit of a snag.

 

extDB pipes stuff back in as a string, which then needs to be converted to an array in order to process it using select.

 

[2014-Nov-07 01:28:42.675728]: ThreadID 0x000b9f2c: extDB: DB_CUSTOM_V3: Trace: Result: [1,[[605,CinderWallDoorway_DZ,10,["74.900223","[13682.30957,2906.453369,-0.079483]","76561198042520374",[[0.965,0.261,0],[0,0,1]]],[],[],0,0]]]

 

_query = "extDB" callExtension "0:DB:getBuildingObjects";
diag_log _query;
_queryArray = call compile _query;
diag_log format["objectsArray: %1", _queryArray];
 
Which then throws the following error: 
 
 1:50:16 "[1, [1,[[605,CinderWallDoorway_DZ,10,["74.900223","[13682.30957,2906.453369,-0.079483]","76561198042520374",[[0.965,0.261,0],[0,0,1]]],[],[],0,0]]]]"
 1:50:16 Error in expression <[1, [1,[[605,CinderWallDoorway_DZ,10,["74.900223","[1>
 1:50:16   Error position: <CinderWallDoorway_DZ,10,["74.900223","[1>
 1:50:16   Error Undefined variable in expression: cinderwalldoorway_dz
 1:50:16 "objectsArray: any"
 1:50:16 "Building Object Array: [605,any,10,["74.900223","[13682.30957,2906.453369,-0.079483]","76561198042520374",[[0.965,0.261,0],[0,0,1]]],[],[],0,0]"
 
Any ideas folks? :(
Link to comment
Share on other sites

Nevermind, was my own damn fault :P Hadn't enabled the wrapping of varchar fields with quotes in the config :(

 

Still, now it's failing on this:

 

 2:49:34 "[1, [1,[[605,"CinderWallDoorway_DZ",10,"["74.900223","[13682.30957,2906.453369,-0.079483]","76561198042520374",[[0.965,0.261,0],[0,0,1]]]",[],"[]",0,0]]]]"
 2:49:34 Error in expression <, [1,[[605,"CinderWallDoorway_DZ",10,"["74.900223","[13682.30957,2906.453369,-0.>
 2:49:34   Error position: <74.900223","[13682.30957,2906.453369,-0.>
 2:49:34   Error Missing ]
 2:49:34 Error in expression <, [1,[[605,"CinderWallDoorway_DZ",10,"["74.900223","[13682.30957,2906.453369,-0.>
 2:49:34   Error position: <74.900223","[13682.30957,2906.453369,-0.>
 2:49:34   Error Missing ]
 2:49:34 "objectsArray: <null>"
 2:49:34 "Building Object Array: any"
 2:49:34 Error in expression <y];
diag_log format["objectsArray: %1", _queryArray];
 
 
 
_objects = ((_queryArra>
 2:49:34   Error position: <_queryArray];
 
 
 
_objects = ((_queryArra>
 2:49:34   Error Undefined variable in expression: _queryarray
 2:49:34 File z\addons\dayz_server\init\server_functions.sqf, line 202
 
Link to comment
Share on other sites

btw, this is how you parameterize your queries according to the doc:

http://arma2netmysqlplugin.readthedocs.org/en/latest/

 

 


Your SQF code will look something like this:

_strCreate = format ["", _allWeapons select 0, _loadoutName, _allWeapons select 1,
_allWeapons select 2, _allWeapons select 3,
_allWeapons select 4, _allWeapons select 5];

_create = "Arma2Net.Unmanaged" callExtension format ["Arma2NETMySQL ['weapons', 'CreateNewLoadOut', '%1]", _strCreate];

In this example, “weapons” is the database name. “CreateNewLoadOut” is the MySQL stored procedure. The parameters as part of the procedure are formatted and then passed along as the third argument.

Link to comment
Share on other sites

Well, I figured it out... unfortunately HiveExt only wraps the Classname field in quotes, not ALL varchar fields. extDB doesn't offer that level of granularity, which means that the additional quotes in the returned string cause a syntax error in Arma.

 

The temporary workaround I'm using at the moment is to convert the Worldspace and Hitpoints fields to TEXT instead of VARCHAR.

 

I think the best option in the long run would be to customize extDB for our purposes by adding in more DB_BASIC calls specific to Epoch. Unfortunately, my skills with C++ are non-existent, so someone else is going to have to pick up that torch :P

 

In the meantime, I'll be pushing forward with my altered database until I hit the next roadblock :P

Link to comment
Share on other sites

Just to clarify, here are the HiveExt outputs, and the extDB one:

 

//-----HiveExt-----//
//Before call compile
"["OBJ","605","CinderWallDoorway_DZ","10",["74.900223","[13682.30957,2906.453369,-0.079483]","76561198042520374",[[0.965,0.261,0],[0,0,1]]],[],[],0.0,0.0]"
//After call compile
["OBJ","605","CinderWallDoorway_DZ","10",["74.900223","[13682.30957,2906.453369,-0.079483]","76561198042520374",[[0.965,0.261,0],[0,0,1]]],[],[],0,0]

//-----extDB-----//
//Before call compile
"[1, [1,[[605,"CinderWallDoorway_DZ",10,"["74.900223","[13682.30957,2906.453369,-0.079483]","76561198042520374",[[0.965,0.261,0],[0,0,1]]]",[],"[]",0,0]]]]"
//Call compile throws an error.
Link to comment
Share on other sites

Bingo, got it to work :)

 

 5:17:27 "extDB: Version: 20"
 5:17:27 "extDB: Connected to Database"
 5:17:27 "[1, [1,[[7294]]]]"
 5:17:27 "countArray: [1,[1,[[7294]]]]"
 5:17:27 "Building Object Count: [7294]"
 5:17:27 "WAI: AI Config File Loaded"
 5:17:27 "[2,"1749605807"]"
 5:17:27 "objectsArray: [2,"1749605807"]"
 5:17:27 "returnMessage Key: 1749605807"
 5:17:27 Warnings in z\addons\dayz_communityassets\models\map.p3d:shadow(1000)
 5:17:28 Warning: z\addons\dayz_communityassets\models\compass.p3d:0 Error while trying to generate ST for points: 863, 853, 852
 5:17:28 Warnings in z\addons\dayz_communityassets\models\compass.p3d:shadow(1000)
 5:17:28 "WAI: Initialising missions"
 5:17:28 "WAI: AI Monitor Started"
 5:17:29 "[1,[1,[[274,"SUV_Camo",2788,[51,[5268.4,11043.6,0.01]],[[["Sa58V_RCO_EP1","MG36","M4A3_CCO_EP1"],[1,1,1]],[["HandGrenade_East","PartEngine","PartVRotor","PartWheel","PartGlass","HandGrenade_West","FoodbeefRaw","PartGeneric","ItemBloodbag","ItemMorphine","ItemPainkiller","FoodrabbitCooked","ItemBandage","30Rnd_556x45_StanagSD"],[1,1,1,3,4,1,6,1,6,3,3,1,2,1]],[[],[]]],[["wheel_1_1_steering",0.004],["wheel_1_2_steering",0.004],["wheel_2_1_steering",0.004],["wheel_2_2_steering",0.004],["palivo",0.004],["motor",0.161],["glass1",0.013],["glass2",0.014],["glass3",0.011],["glass4",0.029],["karoserie",0.177]],0.9688600000000001,0.008999999999999999],[363,"MTVR_DES_EP1",11301,[286,[9115.27,9249.87,-0.001]],[[[],[]],[["ItemWaterbottleUnfilled"],[1]],[[],[]]],[["wheel_1_1_steering",1],["wheel_1_2_steering",1],["wheel_1_3_steering",1],["wheel_2_1_steering",1],["wheel_2_2_steering",1],["wheel_2_3_steering",1],["palivo",0.035],["motor",1],["glass1",1],["glass2",1],["glass3",1]],0.80391,1],[721,"WoodFloor_DZ",59,[
 5:17:39 "Building Object Array: [[274,"SUV_Camo",2788,[51,[5268.4,11043.6,0.01]],[[["Sa58V_RCO_EP1","MG36","M4A3_CCO_EP1"],[1,1,1]],[["HandGrenade_East","PartEngine","PartVRotor","PartWheel","PartGlass","HandGrenade_West","FoodbeefRaw","PartGeneric","ItemBloodbag","ItemMorphine","ItemPainkiller","FoodrabbitCooked","ItemBandage","30Rnd_556x45_StanagSD"],[1,1,1,3,4,1,6,1,6,3,3,1,2,1]],[[],[]]],[["wheel_1_1_steering",0.004],["wheel_1_2_steering",0.004],["wheel_2_1_steering",0.004],["wheel_2_2_steering",0.004],["palivo",0.004],["motor",0.161],["glass1",0.013],["glass2",0.014],["glass3",0.011],["glass4",0.029],["karoserie",0.177]],0.96886,0.009],[363,"MTVR_DES_EP1",11301,[286,[9115.27,9249.87,-0.001]],[[[],[]],[["ItemWaterbottleUnfilled"],[1]],[[],[]]],[["wheel_1_1_steering",1],["wheel_1_2_steering",1],["wheel_1_3_steering",1],["wheel_2_1_steering",1],["wheel_2_2_steering",1],["wheel_2_3_steering",1],["palivo",0.035],["motor",1],["glass1",1],["glass2",1],["glass3",1]],0.80391,1],[721,"WoodFloor_DZ",59,["181.3669
 5:17:49 [[7294],[[274,"SUV_Camo",2788,[51,[5268.4,11043.6,0.01]],[[["Sa58V_RCO_EP1","MG36","M4A3_CCO_EP1"],[1,1,1]],[["HandGrenade_East","PartEngine","PartVRotor","PartWheel","PartGlass","HandGrenade_West","FoodbeefRaw","PartGeneric","ItemBloodbag","ItemMorphine","ItemPainkiller","FoodrabbitCooked","ItemBandage","30Rnd_556x45_StanagSD"],[1,1,1,3,4,1,6,1,6,3,3,1,2,1]],[[],[]]],[["wheel_1_1_steering",0.004],["wheel_1_2_steering",0.004],["wheel_2_1_steering",0.004],["wheel_2_2_steering",0.004],["palivo",0.004],["motor",0.161],["glass1",0.013],["glass2",0.014],["glass3",0.011],["glass4",0.029],["karoserie",0.177]],0.96886,0.009],[363,"MTVR_DES_EP1",11301,[286,[9115.27,9249.87,-0.001]],[[[],[]],[["ItemWaterbottleUnfilled"],[1]],[[],[]]],[["wheel_1_1_steering",1],["wheel_1_2_steering",1],["wheel_1_3_steering",1],["wheel_2_1_steering",1],["wheel_2_2_steering",1],["wheel_2_3_steering",1],["palivo",0.035],["motor",1],["glass1",1],["glass2",1],["glass3",1]],0.80391,1],[721,"WoodFloor_DZ",59,["181.366928","[3491.24316
 
Loads all objects from the database perfectly :)
 
Seems to be quicker than HiveExt as well. Will work on converting the other calls tomorrow and test out performance on a live server. If it increases server FPS significantly, I'll look into converting the DB_BASIC commands to Epoch format. If all goes according to plan, this could provide us with a pretty decent alternative to HiveExt for 1.0.6 or 1.0.7.
Link to comment
Share on other sites

from hosting a3wasteland using arma2net, then altis life using arma2net, finally moving to extdb

if that was anything to go by, i would think extdb would be the way forward. performance wise it was miles ahead.
 

i wish i never read this post, i can see lots of changing things to get epoch to work with extdb in my future.

and i have exams coming up damn it.

 

keen to follow this thread a lot more closely though.

Link to comment
Share on other sites

Very cool, we can only hope Epoch Devs are willing to convert.

* I really wish I persued a career in programming. I really enjoy just adding mods to our server and seeing them work. I only wish I had the talent and knowledge to contribute as well. I find myself on these forums multiple times a day just reading and searching. Thanks again everyone. *

Edited by Tricks
Link to comment
Share on other sites

Very cool, we can only hope Epoch Devs are willing to convert.

That's not what this is about and devs are creating their own from scratch for A3 afaik, that will be persistent or something along those lines.

 

Wish I had extra time to geek out on the topic and learn some database side of things, this looks like a lot of fun

Link to comment
Share on other sites

There are SO many roadblocks along the way on this, it's unbelievable.

 

HiveExt does LOTS of processing inside; it's not just DB calls. Looks like I'm going to have to a) figure out how to compile extDB, and b) port some of that processing across from HiveExt if this is going to work efficiently.

 

At the moment I'm re-coding all the functions in SQF, but it's a bit of a ghetto way of doing it.

Link to comment
Share on other sites

19:26:41 "[extDB] existPlayer Data:"
19:26:41 [["[FP]Michael",0]]
19:26:41 "All checks out okay!"
19:26:41 "Character Info:"
19:26:41 [[12,"76561198042520374",[["ItemMap","ItemMatchbox_DZE","ItemCompass","ItemKnife","ItemHatchet_DZE","ItemToolbox","ItemRadio","SCAR_H_LNG_Sniper","Binocular_Vector","UZI_SD_EP1","NVGoggles","ItemEtool","ItemWatch","ItemGPS"],["20Rnd_762x51_B_SCAR","20Rnd_762x51_B_SCAR","20Rnd_762x51_B_SCAR","20Rnd_762x51_B_SCAR","Skin_Sniper1_DZ","FoodSteakCooked","ItemSodaCoke","ItemBloodbag","ItemPainkiller","ItemAntibiotic","ItemMorphine","ItemEpinephrine","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","ItemBandage","ItemBandage","ItemBandage"]],["DZ_Backpack_EP1",[[],[]],[[],[]]],8481,8623,8623,"Survivor2_DZ",0]]
19:26:41 "[extDB] Character Found"
19:26:42 "TIME SYNC: Local Time set to [2013,8,3,12,26]"
19:26:47 "[extDB] Login Record:"
19:26:47 "[1, [1,[]]]"
Link to comment
Share on other sites

I am so very scared lol

Sounds like you are taking the old DB_BASIC protocol code + modifying it to work with Epoch
Anyway if you need a hand or just got some coding questions relating to extDB ( i really should improve the comments in the code at some point) give me a shout on Skype...
I really dont check on this forums much at all lately

Kinda waiting on public release of Epoch Server Files for Arma3.

 

edit: Just noticed a public release of epoch arma 3 server files in the next month ;)

Link to comment
Share on other sites

Putting the code inside the extension is just going to put us back in the same position we are currently in where we are locked in to an extension with very little ability to change what has been hard coded.

 

The extension should facilitate the passing of information between Arma (2/3) and the MySQL DB.  If it allows us to lock down the code that can be fired and blacklist stuff passed to the sql (like extDB currently does).

 

Everything else should be handled server side in ArmA where it can be easily managed and more importantly changed if needed.

 

Give or take bug fixes (if any pop up), the only thing I would like to have seen in extDB is the ability to fire stored procedures and get a return as this would allow manipulation of the data DB side without having to fire long and complex SQL statements or overburden the ArmA server process with its limited resources.

Link to comment
Share on other sites

I am so very scared lol

Sounds like you are taking the old DB_BASIC protocol code + modifying it to work with Epoch

Anyway if you need a hand or just got some coding questions relating to extDB ( i really should improve the comments in the code at some point) give me a shout on Skype...

I really dont check on this forums much at all lately

Kinda waiting on public release of Epoch Server Files for Arma3.

 

edit: Just noticed a public release of epoch arma 3 server files in the next month ;)

 

Not quite :P I'm actually re-coding Epoch itself to use DB_CUSTOM_V3 :)

 

There are one or two features that you could add to a later version which would be AWESOME... some way (in the .ini files) of defining whether or not each field should be wrapped in quotes would solve a LOT of problems. For example, the Worldspace field is a VARCHAR, but wrapping it in quotes causes syntax errors due to the multiple quotes contained within. Classname, on the other hand, is a VARCHAR which NEEDS to be wrapped in quotes before running call compile.

 

I've got a temporary workaround at the moment by changing the column types from VARCHAR to TEXT, but for a public release I know I'm going to get numerous people complaining that it's not working because they forgot to change their column types :P

 

Also, there appears to be a bug with SELECT *; it throws an error every time I've tested it, which is a shame... COUNT(*) works fine, however.

 

I've added you on Steam/Skype; michaelcullen/michaelcullendesign :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×
×
  • Create New...