Arma 3
Няма достатъчно оценки
ArmaRedisClient
 
Оценяване  
Любим
В любими
Премахване от любими
Data Type: Mod, Server
Mod Type: Editor Extension
Тагове: Content Review, X64
Размер на файла
Публикуван на
Обновен на
2.621 MB
6 юли 2015 в 17:39
18 март 2017 в 14:32
15 бележки за промени ( преглед )

Абониране, за да се свали
ArmaRedisClient

Абонирани
Премахване
Описание
This is a lightweight Arma 3 Redis Client Framework.
It can save/load more then the Arma 3 callExtension buffer limit due to split save/load.

NOTE: List Functions can only work within buffer limit!

Redis Server (64bit only) and Demo Mission are included.
ArmaRedisClientEditor for quick and dirty Redis Server edit.

Startup Parameter -arc for Redis Server Settings (Default: -arc=@ArmaRedisClient\config.xml)

See "Description.ext" in Demo Missions for enhanced security features (Arma 3 1.50+).


Setup DB Connection:

NOTE: Hot Swap Feature!

_host = String of your Redis Server Address ( "localhost" is default)
_port = Number of your Redis Server Port ( 6379 is default)
_password = String of your Redis Server Password ( "12345" is default)

[_host, _port, _password] call db_fnc_setup; ( Server or Singleplayer only )
or
[_host, _port ,_password] remoteExecCall ["db_fnc_setup", 2, false]; ( Multiplayer only )


Save to DB:

_key = String to your saved data ( Case sensitivity )
_data = Array of your data you wanna save
_db = ( Optional: ) Number of DB in Redis, Range 0-15 ( 0 is default )

[_key, str _data, _db] spawn db_fnc_save; ( Server or Singleplayer only )
or
[_key, str _data, _db] remoteExec ["db_fnc_save", 2, false]; ( Multiplayer only )


Load from DB:

_key = String to your saved data ( Case sensitivity )
_data = Array of your data
_obj = Target to return data can be Object, Array of Objects, Boolean for Players or Server only, Owner ID, Side or Group ( Multiplayer only )
_fnc = String name of function ( Multiplayer only )
_call = Boolean for call true or false. Default false. ( Multiplayer only )
_db = ( Optional: ) Number of DB in Redis, Range 0-15 ( 0 is default )

_data = [_key, _db] call db_fnc_load; ( Server or Singleplayer only )
or
[_key, player, _fnc, _call, _db] remoteExec ["db_fnc_load", 2, false]; ( Multiplayer only )


Delete from DB:

NOTE: Don't work for List's!

_key = String to your saved data ( Case sensitivity )
_db = ( Optional: ) Number of DB in Redis, Range 0-15 ( 0 is default )

[_key, _db] call db_fnc_delete; ( Server or Singleplayer only )
or
[_key, _db] remoteExec ["db_fnc_delete", 2, false]; ( Multiplayer only )


Add List (or pushBack Element to List) to DB:

_key = String to your saved data ( Case sensitivity )
_data = Array of your data you wanna save
_db = ( Optional: ) Number of DB in Redis, Range 0-15 ( 0 is default )

[_key, _data, _db] spawn db_fnc_listadd; ( Server or Singleplayer only )
or
[_key, _data, _db] remoteExec ["db_fnc_listadd", 2, false]; ( Multiplayer only )


Load List from DB:

_key = String to your saved data ( Case sensitivity )
_data = Array of your data
_obj = Target to return data can be Object, Array of Objects, Owner ID ( 0 = All and 2 = Server only ), Side or Group ( Multiplayer only )
_fnc = String name of function ( Multiplayer only )
_call = Boolean for call true or false. Default false. ( Multiplayer only )
_db = ( Optional: ) Number of DB in Redis, Range 0-15 ( 0 is default )

_data = [_key, _db] call db_fnc_listload; ( Server or Singleplayer only )
or
[_key, player, _fnc, _call, _db] remoteExec ["db_fnc_listload", 2, false]; ( Multiplayer only )


Set List Element in DB to new Value:

_key = String to your saved data ( Case sensitivity )
_index = Number of Index in your List
_data = Number/Array/String of your new Value
_db = ( Optional: ) Number of DB in Redis, Range 0-15 ( 0 is default )

[_key, _index, _data, _db] spawn db_fnc_listset; ( Server or Singleplayer only )
or
[_key, _index, _data, _db] remoteExec ["db_fnc_listset", 2, false]; ( Multiplayer only )


Get List Element from DB:

_key = String to your saved data ( Case sensitivity )
_index = Number of Index in your List
_data = Array of your data
_obj = Target to return data can be Object, Array of Objects, Owner ID ( 0 = All and 2 = Server only ), Side or Group ( Multiplayer only )
_fnc = String name of function ( Multiplayer only )
_call = Boolean for call true or false. Default false. ( Multiplayer only )
_db = ( Optional: ) Number of DB in Redis, Range 0-15 ( 0 is default )

_data = [_key, _index, _db] call db_fnc_listget; ( Server or Singleplayer only )
or
[_key, _index, _obj, _fnc, _call, _db] remoteExec ["db_fnc_listget", 2, false]; ( Multiplayer only )


Remove List Element from DB:

_key = String to your saved data ( Case sensitivity )
_index = Number of Index in your List you want to remove
_db = ( Optional: ) Number of DB in Redis, Range 0-15 ( 0 is default )

[_key, _index, _db] spawn db_fnc_listrem; ( Server or Singleplayer only )
or
[_key, _index, _db] remoteExec ["db_fnc_listrem", 2, false]; ( Multiplayer only )


Delete List from DB:

NOTE: Use only for List's!

_key = String to your saved data ( Case sensitivity )
_db = ( Optional: ) Number of DB in Redis, Range 0-15 ( 0 is default )

[_key, _db] call db_fnc_listdel; ( Server or Singleplayer only )
or
[_key, _db] remoteExec ["db_fnc_listdel", 2, false]; ( Multiplayer only )


Save Code to DB:

_key = String to your saved data ( Case sensitivity )
_code = Code you wanna save
_db = ( Optional: ) Number of DB in Redis, Range 0-15 ( 0 is default )

[_key, _code, _db] spawn db_fnc_codesave; ( Server or Singleplayer only )
or
[_key, _code, _db] remoteExec ["db_fnc_codesave", 2, false]; ( Multiplayer only )


Load Code from DB:

_key = String to your saved data ( Case sensitivity )
_code = Returns your saved Code
_obj = Target to return data can be Object, Array of Objects, Owner ID ( 0 = All and 2 = Server only ), Side or Group ( Multiplayer only )
_fnc = String name of function to return your code( Multiplayer only )
_call = Boolean for call true or false. Default false. ( Multiplayer only )
_db = ( Optional: ) Number of DB in Redis, Range 0-15 ( 0 is default )

_code = [_key, _db] call db_fnc_codeload; ( Server or Singleplayer only )
or
[_key, _obj, _fnc, _call, _db] remoteExec ["db_fnc_codeload", 2, false]; ( Multiplayer only )

Save DB to Harddisk:

Due to DB Backup Systems you may need this command

call db_fnc_savedb; ( Server or Singleplayer only )
or
[] remoteExecCall ["db_fnc_savedb", 2, false]; ( Multiplayer only )


Get Server Time:

_return = String or Array of Server Time
_switch = Boolean true returns String ( Format "DD-MM-YYYY HH:MM:SS" ) / false returns Array of Numbers ( Format [DD,MM,YYYY,HH,MM,SS] ) (Default: String)
_delimiter = ( Optional: ) String for Date delimiter (Default: "-")
_type = ( Optional: ) Number for Date Type 1 = DD-MM-YYYY, 2 = YYYY-MM-DD, 3 = MM-DD-YYYY (Default: 1)

_return = _switch call db_fnc_time; ( Server or Singleplayer only )
or
_return = [_switch, _delimiter, _type] call db_fnc_time; ( Server or Singleplayer only )


Log to Server:

_file = String of your Filename to log ( "ArmaRedisClient.log" is default)
_text = String of your Text to log
_timestamp = ( Optional: ) Boolean true / false to add Timestamp to log ( false is default )

[_file, _text, _timestamp] call db_fnc_log; ( Server or Singleplayer only )
or
[_file, _text, _timestamp] remoteExecCall ["db_fnc_log", 2, false]; ( Multiplayer only )
< >
4 коментара
Big Boss 6 юни в 12:55 
Excellent addon, simple to use for *qualified* ArmA server hosts, and extremely efficient. By comparison, this puts MySQL, SQLite and other read/write (non-realtime) databases to shame. This software is incredibly useful for modders and software developers who want to use realtime data in an extensible manner. In summary, people who haven't made this addon a core part of their dedicated servers for persistant databases are missing out tremendously on both high-speed data read/write and are providing less service to their clients. Use this framework instead, it's perfect!
Sheriff John Johnson 10 ноем. 2016 в 9:33 
can you make a video how to explain how to do it because i got so confused
Creedcoder  [автор] 3 юли 2016 в 15:25 
I hope you like it XD. Feedback is always welcome.
sorophx 2 юли 2016 в 14:05 
Ha! Here I was thinking about trying to write a MongoDB service for Arma, and there's one already for Redis. Guess I don't have to do anything anymore. Redis is a very fast database.