Raised This Month: $143 Target: $400
 35% 

Module: Redis


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
+ARUKARI-
AlliedModders Donor
Join Date: Jul 2004
Location: Japan
Old 02-03-2025 , 04:37   Module: Redis
Reply With Quote #1

Description:
This is a module for amxmodx that allows operations from HLDS to the Redis data store.

Required:
Data store server application supporting Redis protocol.
  • Redis
  • Valkey
  • KeyDB
  • Microsoft Garnet
  • DragonflyDB

Usage for plugins:
This is in its infancy and there are few functions available at this time.
You must also build the module yourself.

See
https://github.com/AoiKagase/Amxx-Module-Redis

A little test:
I took a simple benchmark using Redis.
In one cycle, I did a SET/GET/DEL against a hash table and processed 100,000 cases.
The result was 14 seconds, or 0.00014 per cycle.
Needless to say, since we ran 100,000 cycles in FOR logic, the CPU usage was 100% during that time.
PHP Code:
server_print("[REDIS] BENCHMARK START");
new 
start get_systime();
new 
iResult 0;
for (new 
0100000i++)
{
    
redis_hset_integer("REDIS_TEST_HASH""INTEGER"i);
    
iResult redis_hget_integer("REDIS_TEST_HASH""INTEGER");
    
redis_hdel_field("REDIS_TEST_HASH""INTEGER");
//  server_print("[REDIS] %d", iResult);
}
new 
bench get_systime() - start;
server_print("[REDIS] %d"iResult);
server_print("[REDIS] BENCHMARK %d SEC"bench); 
Code:
[REDIS] BENCHMARK START
[REDIS] 99999
[REDIS] BENCHMARK 14 SEC
__________________
GitHub
SteamWishlist

六四天安門事件
+ARUKARI- is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:02.


Powered by vBulletin®
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Theme made by Freecode